/* ==========================================================
   Homepage: title-only post index
   Har category ka apna rang hai (--h = hue), cards usi se rangte hain.
   Brand colour: #008374 (aapki site ka teal)
   ========================================================== */

.mm-home {
  --mm-ink: #14201e;
  --mm-brand: #008374;
  --mm-deep: #00403a;
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--mm-ink);
}

#primary.mm-area {
  margin-top: 24px;
  margin-bottom: 56px;
}

.mm-home a {
  text-decoration: none;
  color: inherit;
}

.mm-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.mm-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero (sab se naya post) ---------- */

.mm-hero {
  background: var(--mm-deep);
  color: #fff;
  border-radius: 24px;
  padding: clamp(28px, 6vw, 72px);
  margin-bottom: 28px;
}

.mm-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.95rem;
  color: #b8dcd6;
  margin-bottom: 18px;
}

.mm-hero__cat {
  background: #00a894;
  color: #00201c;
  font-weight: 650;
  padding: 3px 12px;
  border-radius: 999px;
}

.mm-hero__title {
  margin: 0 0 30px;
  max-width: 24ch;
  font-size: clamp(2rem, 5.2vw, 4.1rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.mm-hero__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.mm-home .mm-hero__btn {
  display: inline-block;
  background: #fff;
  color: var(--mm-deep);
  font-weight: 650;
  padding: 12px 24px;
  border-radius: 999px;
  transition: background-color 0.15s;
}

.mm-hero__btn:hover {
  background: #d9f2ed;
}

/* ---------- Category filter ---------- */

.mm-filter {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.mm-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: hsl(var(--h, 172) 70% 92%);
  color: hsl(var(--h, 172) 50% 18%);
  transition: background-color 0.15s;
}

.mm-chip:hover {
  background: hsl(var(--h, 172) 70% 85%);
}

.mm-chip--all {
  --h: 172;
  background: #e8ecec;
  color: var(--mm-ink);
}

.mm-chip[aria-pressed="true"] {
  background: hsl(var(--h, 172) 55% 26%);
  color: #fff;
}

.mm-chip--all[aria-pressed="true"] {
  background: var(--mm-ink);
}

.mm-chip__n {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.75;
}

.mm-chip:focus-visible,
.mm-card:focus-visible,
.mm-hero a:focus-visible,
.mm-pager__link:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 3px;
}

/* ---------- Title grid ---------- */

.mm-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-flow: dense;
  gap: 14px;
}

.mm-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 148px;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: hsl(var(--h) 75% 94%);
  color: hsl(var(--h) 45% 13%);
  transition: background-color 0.15s;
}

.mm-card[hidden] {
  display: none;
}

.mm-card:hover {
  background: hsl(var(--h) 75% 88%);
}

.mm-card:hover .mm-card__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mm-card__cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 650;
  color: hsl(var(--h) 65% 28%);
}

.mm-card__cat::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: hsl(var(--h) 65% 42%);
}

.mm-card__title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: inherit;
}

.mm-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.85rem;
  color: hsl(var(--h) 25% 30%);
}

/* ---------- Pagination ---------- */

.mm-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
  font-weight: 600;
}

.mm-home .mm-pager__link {
  background: var(--mm-deep);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
}

.mm-pager__link:hover {
  background: var(--mm-brand);
}

.mm-pager__now {
  color: #4a5755;
}

.mm-empty {
  padding: 40px 0;
  text-align: center;
  color: #4a5755;
}

/* ---------- Tablet / Desktop ---------- */

@media (min-width: 640px) {
  .mm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .mm-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  /* Har 7wan card chaura (2 column) aur bare title ke saath: grid mein tarteeb banti hai */
  .mm-card:nth-child(7n + 1) {
    grid-column: span 2;
    min-height: 172px;
  }

  .mm-card:nth-child(7n + 1) .mm-card__title {
    font-size: 1.85rem;
    line-height: 1.15;
  }
}

@media (max-width: 480px) {
  .mm-wrap {
    padding: 0 14px;
  }

  .mm-hero {
    border-radius: 18px;
  }

  .mm-card {
    min-height: 0;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-card,
  .mm-chip,
  .mm-hero__btn {
    transition: none;
  }
}
