/*
 * Simpleweb Real Estate — native Blog Listing presentation.
 * Scoped to the posts page and category archives rendered by
 * template-parts/blog/archive.php.
 */

body.swrep-parity-shell .swre-blog-listing.site-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: clip;
  background: var(--swrep-ivory);
}

.swre-blog-listing :where(a, button) {
  text-decoration: none;
}

.swre-blog-listing :where(h1, h2, p, ul) {
  margin-top: 0;
}

.swre-blog-listing :where(h1, h2) {
  margin-bottom: 0;
  font-family: var(--swrep-heading-font);
}

.swre-blog-listing :where(ul) {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}

.swre-blog-hero {
  --swre-blog-hero-overlay: .62;
  position: relative;
  min-height: 306px;
  overflow: hidden;
  isolation: isolate;
  color: var(--swrep-white);
  background:
    radial-gradient(circle at 72% 42%, rgba(var(--swrep-gold-rgb), .13), transparent 34%),
    var(--swrep-black);
}

.swre-blog-hero__media,
.swre-blog-hero__shade {
  position: absolute;
  inset: 0;
}

.swre-blog-hero__media {
  z-index: -2;
}

.swre-blog-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 68% 50%;
}

.swre-blog-hero__shade {
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(var(--swrep-black-rgb), .99) 0%,
      rgba(var(--swrep-black-rgb), .94) 30%,
      rgba(var(--swrep-black-rgb), calc(var(--swre-blog-hero-overlay) + .12)) 48%,
      rgba(var(--swrep-black-rgb), calc(var(--swre-blog-hero-overlay) * .35)) 72%,
      rgba(var(--swrep-black-rgb), .08) 100%
    ),
    linear-gradient(0deg, rgba(var(--swrep-black-rgb), .22), transparent 55%);
}

.swre-blog-hero__inner {
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 306px;
}

.swre-blog-hero__content {
  width: min(52%, 570px);
  padding: 42px 0 44px;
}

.swre-blog-hero__eyebrow {
  margin-bottom: 12px;
  color: var(--swrep-gold);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.swre-blog-hero h1 {
  max-width: 560px;
  color: var(--swrep-white);
  font-size: clamp(42px, 3.15vw, 54px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.swre-blog-hero__description {
  max-width: 520px;
  margin: 16px 0 0;
  color: rgba(var(--swrep-white-rgb), .84);
  font-size: 15px;
  line-height: 1.55;
}

.swre-blog-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 46px;
  margin-top: 24px;
  padding: 10px 18px;
  border: 1px solid var(--swrep-gold);
  color: var(--swrep-black);
  background: var(--swrep-gold);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: color .25s ease, background-color .25s ease, transform .25s ease;
}

.swre-blog-hero__cta:hover {
  color: var(--swrep-white);
  background: transparent;
  transform: translateY(-2px);
}

.swre-blog-hero__cta:focus-visible,
.swre-blog-filters__link:focus-visible,
.swre-blog-card a:focus-visible,
.swre-blog-listing .page-numbers:focus-visible,
.swre-blog-listing__empty-link:focus-visible {
  outline: 3px solid var(--swrep-orange);
  outline-offset: 3px;
}

.swre-blog-listing__canvas {
  padding: 26px 0 34px;
  background:
    radial-gradient(circle at 50% -45%, rgba(var(--swrep-gold-rgb), .10), transparent 44%),
    var(--swrep-ivory);
}

.swre-blog-listing__inner {
  z-index: 1;
}

.swre-blog-filters {
  position: relative;
  margin-bottom: 18px;
}

.swre-blog-filters__list {
  display: flex;
  align-items: center;
  gap: 13px;
  overflow-x: auto;
  padding: 1px 2px 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--swrep-gold-rgb), .45) transparent;
}

.swre-blog-filters__item {
  flex: 0 0 auto;
}

.swre-blog-filters__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 8px 18px;
  border: 1px solid rgba(var(--swrep-black-rgb), .13);
  color: var(--swrep-charcoal);
  background: rgba(var(--swrep-white-rgb), .92);
  box-shadow: 0 7px 18px rgba(var(--swrep-black-rgb), .035);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}

.swre-blog-filters__link:hover {
  border-color: rgba(var(--swrep-gold-rgb), .72);
  color: var(--swrep-black);
  transform: translateY(-1px);
}

.swre-blog-filters__link.is-current {
  border-color: var(--swrep-gold);
  color: var(--swrep-white);
  background: var(--swrep-gold);
  box-shadow: 0 8px 20px rgba(var(--swrep-gold-rgb), .18);
}

.swre-blog-listing__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.swre-blog-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(var(--swrep-black-rgb), .14);
  background: var(--swrep-white);
  box-shadow: 0 10px 28px rgba(var(--swrep-black-rgb), .045);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.swre-blog-card:hover,
.swre-blog-card:focus-within {
  border-color: rgba(var(--swrep-gold-rgb), .72);
  box-shadow: 0 18px 40px rgba(var(--swrep-black-rgb), .09);
  transform: translateY(-4px);
}

.swre-blog-card__media {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--swrep-gold-tint);
}

.swre-blog-card__image,
.swre-blog-card__image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.swre-blog-card__image {
  max-width: none;
  object-fit: cover;
  transition: transform .75s cubic-bezier(.2, .65, .2, 1);
}

.swre-blog-card__image-placeholder {
  background:
    linear-gradient(135deg, rgba(var(--swrep-black-rgb), .06), transparent 48%),
    linear-gradient(25deg, var(--swrep-gold-tint), var(--swrep-ivory));
}

.swre-blog-card:hover .swre-blog-card__image,
.swre-blog-card:focus-within .swre-blog-card__image {
  transform: scale(1.045);
}

.swre-blog-card__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 17px 17px 15px;
}

.swre-blog-card__category {
  margin-bottom: 8px;
  color: var(--swrep-gold);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.swre-blog-card__category a {
  color: inherit;
}

.swre-blog-card__category a:hover {
  color: var(--swrep-orange);
}

.swre-blog-card__title {
  color: var(--swrep-black);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.28;
  letter-spacing: -.025em;
}

.swre-blog-card__title a {
  color: inherit;
}

.swre-blog-card__title a:hover {
  color: var(--swrep-orange);
}

.swre-blog-card__excerpt {
  margin: 10px 0 0;
  color: var(--swrep-gray);
  font-size: 13px;
  line-height: 1.55;
}

.swre-blog-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.swre-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: 0;
  color: var(--swrep-gray);
  font-size: 11px;
  line-height: 1.4;
}

.swre-blog-card__link {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  color: var(--swrep-orange);
  font-size: 22px;
  line-height: 1;
  transition: color .2s ease, transform .2s ease;
}

.swre-blog-card__link:hover {
  color: var(--swrep-gold);
  transform: translateX(3px);
}

.swre-blog-listing .navigation.pagination {
  margin: 34px 0 0;
}

.swre-blog-listing .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.swre-blog-listing .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(var(--swrep-black-rgb), .14);
  color: var(--swrep-black);
  background: var(--swrep-white);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.swre-blog-listing .page-numbers:hover,
.swre-blog-listing .page-numbers.current {
  border-color: var(--swrep-gold);
  color: var(--swrep-white);
  background: var(--swrep-gold);
}

.swre-blog-listing .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

.swre-blog-listing__empty {
  padding: 72px 24px;
  border: 1px solid var(--swrep-hairline);
  text-align: center;
  background: var(--swrep-white);
}

.swre-blog-listing__empty h2 {
  color: var(--swrep-black);
  font-size: 32px;
  line-height: 1.2;
}

.swre-blog-listing__empty p {
  margin: 12px auto 0;
  max-width: 560px;
}

.swre-blog-listing__empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 24px;
  padding: 10px 20px;
  color: var(--swrep-white);
  background: var(--swrep-orange);
  font-weight: 700;
}

.swre-blog-listing.has-motion.is-blog-ready [data-swre-blog-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .62s ease var(--swre-blog-delay, 0ms),
    transform .62s cubic-bezier(.2, .7, .2, 1) var(--swre-blog-delay, 0ms);
}

.swre-blog-listing.has-motion.is-blog-ready [data-swre-blog-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1399px) {
  .swre-blog-listing__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .swre-blog-card__title {
    font-size: 19px;
  }
}

@media (max-width: 991px) {
  .swre-blog-hero,
  .swre-blog-hero__inner {
    min-height: 370px;
  }

  .swre-blog-hero__content {
    width: min(66%, 540px);
  }

  .swre-blog-hero__image {
    object-position: 62% 50%;
  }

  .swre-blog-listing__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .swre-blog-hero,
  .swre-blog-hero__inner {
    min-height: 440px;
  }

  .swre-blog-hero__image {
    object-position: 67% 50%;
  }

  .swre-blog-hero__shade {
    background:
      linear-gradient(
        0deg,
        rgba(var(--swrep-black-rgb), .98) 0%,
        rgba(var(--swrep-black-rgb), .88) 47%,
        rgba(var(--swrep-black-rgb), calc(var(--swre-blog-hero-overlay) * .65)) 78%,
        rgba(var(--swrep-black-rgb), .24) 100%
      );
  }

  .swre-blog-hero__inner {
    align-items: flex-end;
  }

  .swre-blog-hero__content {
    width: 100%;
    padding: 58px 0 46px;
  }

  .swre-blog-hero h1 {
    max-width: 520px;
    font-size: clamp(36px, 10.5vw, 46px);
    line-height: 1.04;
  }

  .swre-blog-hero__description {
    font-size: 14px;
  }

  .swre-blog-listing__canvas {
    padding: 24px 0 30px;
  }

  .swre-blog-filters {
    margin-right: -15px;
    margin-left: -15px;
  }

  .swre-blog-filters__list {
    gap: 10px;
    padding-right: 15px;
    padding-left: 15px;
    scroll-padding-inline: 15px;
    scroll-snap-type: x proximity;
  }

  .swre-blog-filters__item {
    scroll-snap-align: start;
  }

  .swre-blog-filters__link {
    min-height: 42px;
    padding-right: 17px;
    padding-left: 17px;
  }

  .swre-blog-listing__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .swre-blog-card__body {
    padding: 20px 20px 18px;
  }

  .swre-blog-card__title {
    font-size: 21px;
  }

  .swre-blog-card__excerpt {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .swre-blog-hero__cta {
    width: 100%;
  }

  .swre-blog-card__body {
    padding-right: 17px;
    padding-left: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .swre-blog-listing *,
  .swre-blog-listing *::before,
  .swre-blog-listing *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .swre-blog-listing.has-motion.is-blog-ready [data-swre-blog-reveal] {
    opacity: 1;
    transform: none;
  }
}
