/* ============================================================
   mPulse Resources Feed — Frontend Styles
   Matches screenshot: centered header, pill tabs, 4-col card grid, nav arrows
   ============================================================ */

.mprf-resources-feed {
  --mprf-cols: 4;
  --mprf-gap: 1.25rem;
  --mprf-radius: 14px;
  --mprf-teal: #1a8faa;
  --mprf-navy: #1f4e6e;
  --mprf-cta: #d45c2a;
  --mprf-border: #dde4ec;
  --mprf-text: #1a2332;
  --mprf-muted: #6b7a94;
  --mprf-bg: #f7f9fc;
  --mprf-white: #ffffff;
  font-family: inherit;
  color: var(--mprf-text);
  padding: 3rem 0;
}

/* ── Header — centered ─────────────────────────────────────── */
.mprf-header {
  text-align: center;
  margin-bottom: 2rem;
}

.mprf-eyebrow {
  font-family: "Mulish", Sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 26px;
  letter-spacing: 2px;
  color: var(--e-global-color-1ea6c74);
}

.mprf-title {
  font-family: "Mulish", Sans-serif;
  font-size: 45px;
  font-weight: 800;
  line-height: 55px;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.mprf-subtitle {
  font-family: "Mulish", Sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 26px;
  letter-spacing: 2px;
  color: var(--e-global-color-1ea6c74);
}

/* ── Filter pills — centered ───────────────────────────────── */
.mprf-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
}
.mprf-card img {
  height: 100%;
  object-fit: cover;
}

.mprf-filter-btn {
  color: #565d6b !important;
  text-align: center !important;
  font-size: 13px !important;
  padding: 7px 16px !important;
  display: inline-block !important;
  border-radius: 30px !important;
  border: 1px solid #e2e2e2 !important;
  background: #f9f9f9 !important;
  font-style: normal !important;
  transition: 0.3s;
  font-weight: 700 !important;
  line-height: 30px !important;
  letter-spacing: 0.2px !important;
  text-transform: uppercase !important;
}
.mprf-filter-btn.active {
  border: 1px solid var(--blue-back, #005e8c) !important;
  color: #fff !important;
  font-weight: 700 !important;
  background: var(--blue-back, #005e8c) !important;
  transition: 0.3s;
}

.mprf-filter-btn:hover {
  border-color: var(--mprf-teal);
  color: var(--mprf-teal);
  background: #f0fafd;
}

.mprf-filter-btn.active {
  background: var(--mprf-navy);
  border-color: var(--mprf-navy);
  color: var(--mprf-white);
}

.mprf-filter-btn:focus-visible {
  outline: 2px solid var(--mprf-teal);
  outline-offset: 2px;
}

/* ── Card grid ─────────────────────────────────────────────── */
.mprf-grid {
  display: grid;
  grid-template-columns: repeat(var(--mprf-cols), minmax(0, 1fr));
  gap: var(--mprf-gap);
  margin-bottom: 1.5rem;
}

/* ── Card ──────────────────────────────────────────────────── */
.mprf-card {
  background: var(--mprf-white);
  border: 1px solid var(--mprf-border);
  border-radius: var(--mprf-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  animation: mprf-fadein 0.3s ease both;
}

.mprf-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

@keyframes mprf-fadein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mprf-card:nth-child(1) {
  animation-delay: 0.04s;
}
.mprf-card:nth-child(2) {
  animation-delay: 0.08s;
}
.mprf-card:nth-child(3) {
  animation-delay: 0.12s;
}
.mprf-card:nth-child(4) {
  animation-delay: 0.16s;
}

/* Thumbnail */
.mprf-card__thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 4/2.5;
  background: #dde8f0;
}

.mprf-card__thumb img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.mprf-card:hover .mprf-card__thumb img {
  transform: scale(1.04);
}

.mprf-card__thumb--placeholder {
  display: block;
}

.mprf-card__thumb--placeholder svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Body */
.mprf-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.125rem 1.125rem;
  gap: 0.45rem;
}

/* Meta row: type label + date */
.mprf-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mprf-card__type {
  color: var(--blue-back, #005e8c) !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 10px !important; /* 90.909% */
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}
.mprf-card__meta time {
  color: #8d8d8d !important;
  text-align: right !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 10px !important; /* 90.909% */
}
/* Per-type colors matching screenshot */
.mprf-type--blog {
  color: #2e7d32;
}
.mprf-type--brochure {
  color: #e65100;
}
.mprf-type--case-study {
  color: var(--mprf-teal);
}
.mprf-type--event {
  color: #ad1457;
}
.mprf-type--playbook {
  color: #283593;
}
.mprf-type--webinar {
  color: #6a1b9a;
}
.mprf-type--white-paper {
  color: #01579b;
}
.mprf-type--news {
  color: #f57f17;
}

.mprf-card__date {
  font-size: 0.7rem;
  color: var(--mprf-muted);
  white-space: nowrap;
}

/* Title */
.mprf-card__title {
  color: #565d6b !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 20px !important; /* 133.333% */
}
.mprf-slider > div {
  display: flex !important;
  height: inherit;
}
.mprf-slider {
  display: flex !important;
}
.mprf-slider > div > div,
.mprf-card {
  height: 100%;
}
.mprf-card__title a {
  color: #565d6b !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 20px !important; /* 133.333% */
  transition: color 0.15s;
}

.mprf-card__title a:hover {
  color: var(--mprf-teal);
}

/* CTA */
.mprf-card__cta {
  color: var(--orange, #ff5f14) !important;
  text-align: right !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  margin-top: auto;
  line-height: 21px !important; /* 150% */
  transition: color 0.15s;
}

.mprf-card__cta:hover {
  color: #b04518;
}

/* ── Nav arrows — centered below grid ─────────────────────── */
.mprf-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.mprf-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--mprf-border);
  background: var(--mprf-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mprf-text);
  transition: all 0.18s ease;
  padding: 0;
}
.mprf-nav-btn {
  background: transparent !important;
  padding: 0 !important;
  border: unset !important ;
}
/* .mprf-nav-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
} */

.mprf-nav-btn svg {
  min-width: 35px;
  height: 35px;
  aspect-ratio: 1/1;
}

/* .mprf-nav-btn:hover:not(:disabled) {
  border-color: var(--mprf-teal);
  color: var(--mprf-teal);
  background: #f0fafd;
} */

/* .mprf-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
} */

/* ── Skeleton loading ──────────────────────────────────────── */
.mprf-card--skeleton {
  pointer-events: none;
}

/* Shared shimmer utility — used on all skeleton elements */
.mprf-skel,
.mprf-card--skeleton .mprf-card__thumb,
.mprf-card--skeleton .mprf-card__type,
.mprf-card--skeleton .mprf-card__title,
.mprf-card--skeleton .mprf-card__excerpt {
  background: linear-gradient(90deg, #f0f3f8 25%, #e4e9f0 50%, #f0f3f8 75%);
  background-size: 200% 100%;
  animation: mprf-shimmer 1.4s infinite;
  border-radius: 4px;
  color: transparent !important;
}

/* Stagger shimmer so cards don't all pulse in sync */
.swiper-slide:nth-child(1) .mprf-skel {
  animation-delay: 0s;
}
.swiper-slide:nth-child(2) .mprf-skel {
  animation-delay: 0.15s;
}
.swiper-slide:nth-child(3) .mprf-skel {
  animation-delay: 0.3s;
}
.swiper-slide:nth-child(4) .mprf-skel {
  animation-delay: 0.45s;
}

.mprf-card--skeleton .mprf-card__thumb,
.mprf-card__thumb.mprf-skel {
  border-radius: 0;
}

/* Keep body flex so placeholder CTA sits at bottom */
.mprf-card--skeleton .mprf-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}

@keyframes mprf-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── No results ────────────────────────────────────────────── */
.mprf-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--mprf-muted);
  font-size: 0.95rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .mprf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .mprf-grid {
    grid-template-columns: 1fr;
  }
  .mprf-filter-btn {
    font-size: 0.65rem;
    padding: 0.45rem 1rem;
  }
}
