/* ==========================================================================
   Mortgage Monkey — blog listing + single post
   Prefix: mm-
   Copy this entire file into the staging theme CSS.

   Unprefixed (WordPress native — do not rename in HTML):
   .pagination, .nav-links, .page-numbers, .current, .prev, .next
   name="s" on the search field
   .screen-reader-text
   .button (existing theme search/submit button)

   All other blog classes use the mm- prefix to avoid theme conflicts.
   Styles are scoped under .mm-blog / .mm-single so they do not leak site-wide.
   ========================================================================== */

.mm-blog,
.mm-single {
  --mm-blue: #26aae1;
  --mm-cyan: #0ebfe9;
  --mm-yellow: #fcf950;
  --mm-text: #000;
  --mm-text-muted: #555;
  --mm-border: #e0e0e0;
  --mm-surface: #fff;
  --mm-radius: 6px;
  overflow-x: hidden;
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  line-height: 155%;
  color: var(--mm-text);
}

.mm-blog *,
.mm-blog *::before,
.mm-blog *::after,
.mm-single *,
.mm-single *::before,
.mm-single *::after {
  box-sizing: border-box;
}

.mm-blog h1,
.mm-blog h2,
.mm-blog h3,
.mm-blog h4,
.mm-blog h5,
.mm-blog h6,
.mm-single h1,
.mm-single h2,
.mm-single h3,
.mm-single h4,
.mm-single h5,
.mm-single h6 {
  font-family: inherit;
  font-weight: 700;
  line-height: 1.3;
}

.mm-blog a,
.mm-single a {
  color: var(--mm-blue);
  text-decoration: none;
  position: relative;
}

.mm-blog a::after,
.mm-single a::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--mm-cyan);
  transition:
    width 0.3s ease 0s,
    left 0.3s ease 0s;
}

.mm-blog a:hover::after,
.mm-single a:hover::after {
  width: 100%;
  left: 0;
}

/* Same as the theme: no underline on images, icons, buttons, pagination */
.mm-blog .mm-blog-card__image::after,
.mm-blog .mm-share__list a::after,
.mm-blog .pagination a::after,
.mm-blog a.button::after,
.mm-single .mm-blog-card__image::after,
.mm-single .mm-share__list a::after,
.mm-single .pagination a::after,
.mm-single .mm-article__featured a::after,
.mm-single a.button::after {
  content: none;
  display: none;
}

.mm-container {
  margin: 0 auto;
  max-width: 1320px;
  padding: 0 20px;
}

.mm-section {
  padding: 75px 0;
}

.mm-blog img,
.mm-single img {
  max-width: 100%;
  height: auto;
  display: block;
}

.mm-blog .screen-reader-text,
.mm-single .screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Interior banner
   -------------------------------------------------------------------------- */
.mm-page-header {
  position: relative;
  height: 80vh;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center left;
  background-attachment: fixed;
  color: #fff;
}

.mm-page-header::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(38, 170, 225, 0.5);
}

.mm-page-header__inner {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  text-align: center;
}

.mm-page-header__title {
  margin: 0 0 8px;
  font-size: 2.6em;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-align: center;
}

.mm-page-breadcrumb {
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 0.95em;
}

.mm-page-breadcrumb a {
  color: #fff;
}

.mm-page-breadcrumb--in-content {
  text-align: left;
  color: var(--mm-text-muted);
  margin: 0 0 16px;
}

.mm-page-breadcrumb--in-content a {
  color: var(--mm-blue);
}

/* --------------------------------------------------------------------------
   Listing / single layout: main + sidebar
   -------------------------------------------------------------------------- */
.mm-blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}

.mm-blog-layout__main {
  min-width: 0;
}

.mm-blog-grid {
  display: grid;
  gap: 32px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-blog-grid--three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mm-blog-grid--two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mm-blog-grid--four-column {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* --------------------------------------------------------------------------
   Card — listing + related posts
   -------------------------------------------------------------------------- */
.mm-blog-card {
  display: flex;
  flex-direction: column;
  background: var(--mm-surface);
  border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius);
  overflow: hidden;
  height: 100%;
}

.mm-blog-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d9eef7;
}

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

.mm-blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 18px 20px;
}

.mm-blog-card__meta {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75em;
  color: var(--mm-blue);
}

.mm-blog-card__meta a {
  color: var(--mm-blue);
}

.mm-blog-card__title {
  margin: 0 0 8px;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mm-text);
}

.mm-blog-card__title a {
  color: var(--mm-text);
}

.mm-blog-card__title a:hover {
  color: var(--mm-blue);
}

.mm-blog-card__date {
  margin: 0 0 10px;
  color: var(--mm-text-muted);
  font-size: 0.85em;
}

.mm-blog-card__excerpt {
  margin: 0 0 14px;
  color: #333;
  font-size: 0.95em;
  line-height: 1.55;
  flex: 1 1 auto;
}

.mm-blog-card__excerpt p {
  margin: 0;
}

.mm-blog-card__more {
  font-weight: 500;
  color: var(--mm-blue);
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.mm-blog-sidebar {
  min-width: 0;
}

@media (min-width: 901px) {
  .mm-single .mm-blog-sidebar {
    position: sticky;
    top: 24px;
  }
}

.mm-sidebar-widget {
  background: var(--mm-surface);
  border-top: 3px solid var(--mm-blue);
  border-right: 1px solid var(--mm-border);
  border-bottom: 1px solid var(--mm-border);
  border-left: 1px solid var(--mm-border);
  border-radius: var(--mm-radius);
  padding: 22px 20px 20px;
  margin: 0 0 28px;
}

.mm-sidebar-widget:last-child {
  margin-bottom: 0;
}

.mm-sidebar-widget__title {
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 2px solid var(--mm-yellow);
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mm-text);
}

.mm-sidebar-widget__content {
  margin: 0;
}

.mm-sidebar-widget__content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-sidebar-widget__content li {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--mm-border);
}

.mm-sidebar-widget__content li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.mm-sidebar-widget__content a {
  color: #333;
}

.mm-sidebar-widget__content a:hover {
  color: var(--mm-blue);
}

.mm-sidebar-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mm-sidebar-search input[type="search"],
.mm-sidebar-search input[type="text"] {
  flex: 1 1 140px;
  min-width: 0;
  width: auto;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: var(--mm-radius);
  background: #fff;
  color: #000;
}

.mm-sidebar-search input[type="submit"],
.mm-sidebar-search .button {
  flex: 0 0 auto;
  padding: 12px 22px;
  font-size: 14px;
  border-radius: 6px;
  border: 2px solid #fcf950;
  background: #fcf950;
  color: #222;
  text-transform: uppercase;
  cursor: pointer;
}

.mm-sidebar-search input[type="submit"]:hover,
.mm-sidebar-search .button:hover {
  background: #0ebfe9;
  border-color: #0ebfe9;
}

/* --------------------------------------------------------------------------
   Pagination — WordPress class names kept as-is
   Scoped so this does not restyle pagination on other templates
   -------------------------------------------------------------------------- */
.mm-blog .pagination,
.mm-single .pagination {
  margin: 40px 0 0;
  text-align: center;
}

.mm-blog .pagination .nav-links,
.mm-single .pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.mm-blog .pagination .page-numbers,
.mm-single .pagination .page-numbers {
  display: inline-block;
  min-width: 40px;
  padding: 10px 14px;
  border: 2px solid var(--mm-blue);
  border-radius: var(--mm-radius);
  background: #fff;
  color: var(--mm-blue);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.mm-blog .pagination .page-numbers:hover,
.mm-single .pagination .page-numbers:hover {
  background: var(--mm-yellow);
  border-color: var(--mm-yellow);
  color: #222;
}

.mm-blog .pagination .page-numbers.current,
.mm-single .pagination .page-numbers.current {
  background: var(--mm-yellow);
  border-color: var(--mm-yellow);
  color: #222;
  font-weight: 700;
}

.mm-blog .pagination .prev,
.mm-blog .pagination .next,
.mm-single .pagination .prev,
.mm-single .pagination .next {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Single article
   -------------------------------------------------------------------------- */
.mm-article {
  min-width: 0;
}

.mm-article__title {
  margin: 0 0 12px;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--mm-text);
  text-align: left;
}

.mm-article__meta {
  margin: 0 0 24px;
  color: var(--mm-text-muted);
  font-size: 0.9em;
}

.mm-article__featured {
  margin: 0 0 28px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d9eef7;
  border-radius: var(--mm-radius);
}

.mm-article__featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mm-article__content h2 {
  margin: 1.4em 0 0.5em;
  font-size: 1.45em;
  color: var(--mm-text);
}

.mm-article__content h3 {
  margin: 1.25em 0 0.4em;
  font-size: 1.2em;
  color: var(--mm-text);
}

.mm-article__content p {
  margin: 0 0 1em;
  color: #333;
}

.mm-article__content ul,
.mm-article__content ol {
  margin: 0 0 1.2em;
  padding: 0 0 0 1.3em;
}

.mm-article__content li {
  margin: 0 0 0.45em;
  color: #333;
}

.mm-article__content a {
  color: var(--mm-blue);
}

.mm-article__content blockquote {
  margin: 0 0 1.2em;
  padding: 12px 0 12px 18px;
  border-left: 3px solid var(--mm-yellow);
  color: #333;
  font-style: italic;
}

.mm-faq {
  margin: 2em 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--mm-border);
}

.mm-faq > h2 {
  margin-top: 1em;
}

.mm-faq__item {
  margin: 0 0 1.25em;
}

.mm-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--mm-border);
}

.mm-share__label {
  margin: 0;
  font-weight: 700;
  color: var(--mm-text);
}

.mm-share__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-share__list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mm-blue);
  color: #fff;
  text-decoration: none;
}

.mm-share__list a:hover {
  background: var(--mm-cyan);
  color: #fff;
}

.mm-post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 28px 0 0;
}

.mm-post-nav a {
  color: var(--mm-blue);
  font-weight: 500;
}

.mm-related {
  background: #fff;
}

.mm-related__title {
  margin: 0 0 28px;
  font-size: 2.2em;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  color: var(--mm-text);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .mm-blog-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 36px;
  }

  .mm-blog-grid--three-column,
  .mm-blog-grid--four-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mm-blog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mm-page-header {
    background-attachment: scroll;
  }

  .mm-page-header__title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .mm-blog-grid--three-column,
  .mm-blog-grid--two-column,
  .mm-blog-grid--four-column {
    grid-template-columns: 1fr;
  }

  .mm-article__title {
    font-size: 1.55em;
  }

  .mm-related__title {
    text-align: center;
  }

  .mm-sidebar-search {
    flex-wrap: nowrap;
  }

  .mm-blog .pagination .nav-links,
  .mm-single .pagination .nav-links {
    gap: 6px;
  }

  .mm-blog .pagination .page-numbers,
  .mm-single .pagination .page-numbers {
    min-width: 36px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .mm-section {
    padding: 40px 0;
  }
}

@media (max-width: 421px) {
  .mm-sidebar-search {
    flex-wrap: wrap;
  }

  .mm-sidebar-search input[type="submit"],
  .mm-sidebar-search .button {
    width: 100%;
  }

  .mm-page-header__title {
    font-size: 1.7em;
  }
}

/*
==========================================================================
   COMMENTED OUT — not needed for this handoff
   Uncomment later if you add testimonials / reverse-mortgage CTA back.
==========================================================================

.mm-reviews {
	background: #f0f0f0;
}

.mm-reviews__title {
	margin-bottom: 36px;
	text-align: center;
}

.mm-reviews-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mm-review-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 22px 20px 20px;
}

.mm-cta { }

.mm-cta__title { text-align: left; }

.mm-cta__image img {
	width: 100%;
	min-height: 280px;
	object-fit: cover;
	border-radius: 6px;
}

@media (max-width: 768px) {
	.mm-reviews-grid { grid-template-columns: 1fr; }
	.mm-cta__title { text-align: center; }
}

*/
