/* Media Center — public listing pages (category, search, archive, author, tag) */
.mc-listing-page {
  padding: 0 0 3.25rem;
  background: #eef1f6;
}

.mc-listing-body {
  padding-top: 1.15rem;
}

.mc-listing-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
  padding: 2.4rem 0 2.55rem;
  text-align: center;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  background: #0b1f3a;
}

.mc-listing-hero-media,
.mc-listing-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mc-listing-hero-media {
  z-index: 0;
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
  transform: scale(1.02);
  filter: brightness(1.2) contrast(1.05) saturate(1.08);
}

.mc-listing-hero-shade {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 20, 48, 0.42) 0%, rgba(11, 40, 96, 0.48) 48%, rgba(8, 24, 56, 0.55) 100%),
    linear-gradient(105deg, rgba(9, 66, 162, 0.22), rgba(11, 40, 96, 0.16) 55%, rgba(68, 29, 4, 0.12));
}

.mc-listing-hero-inner {
  position: relative;
  z-index: 2;
}

.mc-listing-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  width: min(14rem, 42%);
  height: 3px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #f6b100, transparent);
}

.mc-listing-header {
  margin: 0;
  max-width: 44rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mc-listing-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 252, 231, 0.92);
}

.mc-listing-title {
  margin: 0 0 0.4rem;
  font-family: var(--priFont, "Figtree"), system-ui, sans-serif;
  font-size: clamp(1.7rem, 2.2vw + 1.1rem, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  overflow-wrap: break-word;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.mc-listing-desc {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(236, 246, 255, 0.92);
  max-width: 36rem;
}

.mc-listing-count {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(246, 177, 0, 0.6);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fffce7;
  backdrop-filter: blur(4px);
}

.mc-listing-count-page {
  font-weight: 500;
  color: rgba(255, 252, 231, 0.82);
}

.mc-listing-author {
  margin: 0.35rem 0 0.85rem;
  padding: 0.85rem 1rem;
  width: min(100%, 34rem);
  border-left: 3px solid var(--primaryColor, #f6b100);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0 10px 10px 0;
  text-align: left;
}

.mc-listing-author-name {
  margin: 0;
  font-weight: 700;
  color: #fff;
}

.mc-listing-author-bio {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(236, 246, 255, 0.88);
}

/* Breadcrumbs inside listing hero */
.mc-listing-hero .mc-breadcrumbs {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
}

.mc-listing-hero .mc-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-listing-hero .mc-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: rgba(255, 255, 255, 0.45);
}

.mc-listing-hero .mc-breadcrumbs a {
  color: rgba(255, 252, 231, 0.92);
  text-decoration: none;
  font-weight: 600;
}

.mc-listing-hero .mc-breadcrumbs a:hover,
.mc-listing-hero .mc-breadcrumbs a:focus-visible {
  color: #f6b100;
  text-decoration: underline;
}

.mc-listing-hero .mc-breadcrumbs [aria-current="page"] {
  color: rgba(255, 255, 255, 0.78);
}

/* Fallback breadcrumbs outside hero (empty states etc.) */
.mc-breadcrumbs {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
}

.mc-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #888;
}

.mc-breadcrumbs a {
  color: #0942a2;
  text-decoration: none;
}

.mc-breadcrumbs a:hover,
.mc-breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.mc-breadcrumbs [aria-current="page"] {
  color: #333;
}

/* Compact branded filter strip */
.mc-listing-toolbar {
  position: sticky;
  top: 0.65rem;
  z-index: 30;
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%);
  border: 1px solid #d4dcea;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(11, 40, 96, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mc-listing-search {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  max-width: 34rem;
}

.mc-listing-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #c9d3e0;
  border-radius: 999px;
  font-size: 0.92rem;
  background: #fff;
}

.mc-listing-search input[type="search"]:focus {
  outline: none;
  border-color: #0942a2;
  box-shadow: 0 0 0 3px rgba(9, 66, 162, 0.14);
}

.mc-listing-search button {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0.55rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: #0942a2;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.mc-listing-search button:hover,
.mc-listing-search button:focus-visible {
  background: #0b2860;
}

.mc-listing-search button:focus-visible {
  outline: 2px solid #f6b100;
  outline-offset: 2px;
}

.mc-listing-filter-row {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.55rem 0.7rem;
  align-items: start;
  min-width: 0;
}

.mc-listing-filter-label {
  margin: 0;
  padding-top: 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a778b;
  line-height: 1.2;
}

.mc-listing-cats,
.mc-listing-years,
.mc-listing-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: visible;
  padding: 0;
}

.mc-listing-cats a,
.mc-listing-years a,
.mc-listing-tags a,
.mc-listing-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0.38rem 0.72rem;
  border: 1px solid #d5dbe6;
  border-radius: 999px;
  background: #fff;
  color: #0b1f3a;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mc-listing-cats a:hover,
.mc-listing-years a:hover,
.mc-listing-tags a:hover,
.mc-listing-cats a:focus-visible,
.mc-listing-years a:focus-visible,
.mc-listing-tags a:focus-visible {
  border-color: #0942a2;
  color: #0942a2;
  background: #eef4fb;
  outline: none;
}

.mc-listing-cats a.is-active,
.mc-listing-years a.is-active,
.mc-listing-tags a.is-active,
.mc-listing-cat.is-active {
  background: #0b2860;
  border-color: #0b2860;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(246, 177, 0, 0.85);
}

.mc-listing-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: rgba(9, 66, 162, 0.12);
  color: #0942a2;
  font-size: 0.68rem;
  font-weight: 800;
}

.mc-listing-cats a.is-active .mc-listing-chip-count,
.mc-listing-cat.is-active .mc-listing-chip-count {
  background: #f6b100;
  color: #0b1f3a;
}

/* Results — full width, no logo gutter */
.mc-listing-page .mc-card-grid {
  max-width: none;
}

.mc-listing-page .mc-card {
  border-radius: 10px;
  border-color: #d8dde8;
  box-shadow: 0 10px 28px rgba(11, 40, 96, 0.06);
}

.mc-listing-page .mc-card-media {
  aspect-ratio: 16 / 9;
}

.mc-listing-page .mc-card-media img {
  object-position: center 20%;
}

/* Empty */
.mc-listing-empty {
  max-width: 36rem;
  padding: 1.75rem 1.25rem;
  background: #fff;
  border: 1px solid #d8dde8;
  border-radius: 10px;
}

.mc-listing-empty-title {
  margin: 0 0 0.5rem;
  font-family: Merriweather, Georgia, serif;
  font-size: 1.35rem;
  color: #0b1f3a;
}

.mc-listing-empty-text {
  margin: 0 0 1rem;
  color: #444;
  line-height: 1.55;
}

.mc-listing-empty-links {
  margin: 1rem 0;
}

.mc-listing-empty-links a {
  color: #0942a2;
}

.mc-listing-search--empty {
  margin: 1rem 0;
}

.mc-listing-cats--empty {
  margin-top: 0.75rem;
}

/* Pagination */
.mc-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid #d8dde8;
}

.mc-pagination-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-pagination-btn,
.mc-pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #d5dbe1;
  border-radius: 8px;
  background: #fff;
  color: #222;
  text-decoration: none;
  font-size: 0.92rem;
}

.mc-pagination-btn:hover,
.mc-pagination-num:hover,
.mc-pagination-btn:focus-visible,
.mc-pagination-num:focus-visible {
  border-color: #0942a2;
  color: #0942a2;
  outline: none;
}

.mc-pagination-num.is-current {
  background: #0b2860;
  border-color: #0b2860;
  color: #fff;
  font-weight: 600;
}

.mc-pagination-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mc-card-meta .mc-card-read {
  white-space: nowrap;
}

@media (max-width: 860px) {
  /*
   * Categories already live in the sticky header subnav on small screens.
   * Hiding this duplicate browse block stops it from filling the viewport.
   */
  .mc-listing-filter-row--browse {
    display: none;
  }

  /* Header search covers browse listings; keep the form on dedicated search pages */
  .mc-listing-search:not(.mc-listing-search--primary) {
    display: none;
  }

  .mc-listing-cats,
  .mc-listing-years,
  .mc-listing-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.3rem;
    padding-bottom: 0.1rem;
  }

  .mc-listing-cats::-webkit-scrollbar,
  .mc-listing-years::-webkit-scrollbar,
  .mc-listing-tags::-webkit-scrollbar {
    display: none;
  }

  .mc-listing-cats a,
  .mc-listing-years a,
  .mc-listing-tags a,
  .mc-listing-cat {
    font-size: 0.72rem;
    padding: 0.32rem 0.58rem;
  }
}

@media (max-width: 720px) {
  .mc-listing-filter-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .mc-listing-filter-label {
    padding-top: 0;
    padding-left: 0.15rem;
  }

  .mc-listing-toolbar {
    position: static;
    top: auto;
    padding: 0.65rem 0.7rem;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .mc-listing-page {
    padding-top: 0;
  }

  .mc-listing-hero {
    padding: 1.7rem 0 1.85rem;
  }

  .mc-listing-body {
    padding-top: 0.95rem;
  }

  .mc-listing-search {
    max-width: none;
  }

  .mc-listing-search button {
    padding-inline: 0.9rem;
  }

  .mc-listing-toolbar {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .mc-listing-title {
    font-size: 1.55rem;
  }
}
