.uk-blog-listing {
  padding: 4rem 0;
  background: var(--song-paper, #f9f7f3);
}

.uk-blog-listing__inner {
  max-width: var(--song-shell-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.uk-blog-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.uk-blog-channel-card {
  display: flex;
  min-height: 16rem;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.uk-blog-channel-card:hover,
.uk-blog-channel-card:focus-within {
  border-color: var(--song-gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.uk-blog-channel-card__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--song-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.uk-blog-channel-card__title {
  margin: 0 0 1rem;
  color: var(--song-navy);
  font-family: var(--song-serif);
  font-size: 1.75rem;
  line-height: 1.2;
}

.uk-blog-channel-card__description {
  margin: 0 0 1.5rem;
  color: #6b7280;
  line-height: 1.625;
}

.uk-blog-channel-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--song-navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.uk-blog-channel-card__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.uk-blog-channel-card__all-link {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.uk-blog-channel-card__all-link:focus-visible {
  outline: 3px solid var(--song-gold);
  outline-offset: 3px;
}

.uk-blog-channel-card__link {
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--song-navy);
}

.uk-blog-channel-card__link:hover {
  border-color: var(--song-gold);
  color: var(--song-gold);
}

.uk-blog-tag-intro {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  line-height: 1.75;
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.blog-filter__btn {
  padding: 0.5rem 1rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  cursor: pointer;
  background: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.blog-filter__btn--active,
.blog-filter__btn:hover {
  background: var(--song-navy);
  color: #fff;
  border-color: var(--song-navy);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.blog-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.blog-card__img-wrap {
  overflow: hidden;
  height: 12rem;
}

.blog-card__img-link {
  display: block;
  height: 100%;
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  pointer-events: none;
  user-select: none;
}

.blog-card:hover .blog-card__img {
  transform: scale(1.05);
}

.blog-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.blog-card__cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--song-gold);
}

.blog-card__date {
  font-size: 10px;
  color: #9ca3af;
}

.blog-card__title {
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--song-navy);
  margin-bottom: 0.75rem;
  transition: color 0.15s;
}

.blog-card:hover .blog-card__title {
  color: var(--song-gold);
}

.blog-card__title a {
  text-decoration: none;
  color: inherit;
}

.blog-card__summary {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.625;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--song-navy);
  text-decoration: none;
  transition: color 0.15s;
}

.blog-card__more:hover {
  color: var(--song-gold);
}

.blog-empty {
  text-align: center;
  padding: 5rem 0;
  color: #9ca3af;
}

.blog-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

/* Imported articles use grid layouts containing intentionally wide tables.
 * Grid children default to min-width:auto, which lets a 600px table widen the
 * entire mobile page.  Let the content column shrink and keep wide data inside
 * its own horizontal scroller instead. */
.uk-blog-post-content .grid > *,
.uk-blog-post-content .uk-tw-grid > * {
  min-width: 0;
  max-width: 100%;
}

.uk-blog-post-content .overflow-x-auto {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.uk-blog-post-content img,
.uk-blog-post-content video,
.uk-blog-post-content iframe {
  max-width: 100%;
}

.uk-blog-post-content pre,
.uk-blog-post-content code,
.uk-blog-post-content a,
.uk-blog-post-content h1,
.uk-blog-post-content h2,
.uk-blog-post-content h3 {
  overflow-wrap: anywhere;
}

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

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .uk-blog-listing {
    padding: 2.5rem 0 3rem;
  }

  .uk-blog-listing__inner {
    padding: 0 1.25rem;
  }

  .uk-blog-hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .uk-blog-hero .container,
  .uk-blog-post-content .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .uk-blog-hero h1 {
    font-size: 2.25rem;
    line-height: 1.12;
  }

  .blog-filter {
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-right: -1.25rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-right: 1.25rem;
    padding-bottom: 0.5rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .blog-filter__btn {
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .blog-grid {
    gap: 1.5rem;
  }

  .uk-blog-channel-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-card__img-wrap {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .blog-card__body {
    padding: 1.25rem;
  }

  .blog-card__title {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  .blog-card__more {
    min-height: 2.75rem;
  }

  .uk-native-blog-post .breadcrumb-bar .song-container {
    overflow-x: auto;
  }

  .uk-blog-post-content h1 {
    font-size: clamp(2rem, 9vw, 2.5rem);
    line-height: 1.12;
  }

  .uk-blog-post-content h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .uk-blog-post-content h3 {
    font-size: 1.2rem;
    line-height: 1.35;
  }

  .uk-blog-post-content .quick-facts p {
    white-space: normal;
  }

  .uk-blog-post-content .btn-song-light,
  .uk-blog-post-content .btn-song-primary,
  .uk-blog-post-content .btn-song-outline {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
}
