/*
 * blogs styles.
 * Keep rule order intact: later rules refine earlier layouts and responsive states.
 */

.blogs-heading {
  padding: 60px 0 50px;
  max-width: 1000px;
}
.blogs-heading h1 {
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 25px;
}
.blogs-heading > p:last-child {
  font-size: 18px;
  line-height: 1.75;
  color: var(--body);
}
.blogs-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 18px;
}
.blogs-filters {
  display: flex;
  gap: 28px;
  align-items: center;
}
.blogs-filters button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 8px 0;
  color: var(--body);
  font-size: 15px;
  white-space: nowrap;
}
.blogs-filters button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.blogs-search input {
  width: 240px;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  font: inherit;
  font-size: 14px;
}
.blogs-count {
  font-size: 12px;
  color: var(--body);
  margin: 20px 0 28px;
}
.blogs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
  padding-bottom: 30px;
}
.blog-card {
  min-width: 0;
  background: #f1f1f1;
  color: #222;
}
.blog-card:nth-child(even) {
  background: #e8e8e8;
}
.blog-image {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #ddd;
}
.blog-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-copy {
  padding: 30px;
}
.blog-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 18px;
}
.blog-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(25px, 2.1vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.blog-copy > p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin: 0 0 20px;
}
.blog-copy .blog-read {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  margin-top: 25px;
  color: #444;
  font-size: 14px;
}
.blog-card[hidden] {
  display: none !important;
}
.blog-read .link-label {
  border-bottom: 1px solid currentColor;
}
#blogs-empty {
  font-size: 16px;
  padding: 35px 0;
  color: var(--body);
}
@media (hover: hover) {
  .blog-card:hover .blog-image img {
    transform: scale(1.025);
  }
}
@media (max-width: 760px) {
  .blogs-heading {
    padding: 35px 0;
  }
  .blogs-heading br {
    display: none;
  }
  .blogs-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .blogs-search input {
    width: 100%;
  }
  .blogs-filters {
    gap: 22px;
    overflow: auto;
  }
  .blogs-filters button {
    font-size: 14px;
  }
  .blogs-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .blog-copy {
    padding: 25px;
  }
  .blog-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .blog-card h2 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .blog-image img {
    transition: none;
  }
  .blog-card:hover .blog-image img {
    transform: none;
  }
}

/* Editorial blog cards inspired by the supplied QF event layout. */
.blogs-grid {
  gap: 55px 32px;
}
.blog-card,
.blog-card:nth-child(even) {
  background: transparent;
  color: var(--ink);
}
.blog-image {
  position: relative;
  aspect-ratio: 2.16;
  overflow: hidden;
}
.blog-copy {
  padding: 25px 0 0;
}
.blog-date-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 12px 16px;
  background: #d4d3d0;
  color: #222;
  line-height: 1.2;
  font-size: 14px;
}
.blog-date-badge strong {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  margin: 4px 0;
}
.blog-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 2.1vw, 34px);
  line-height: 1.3;
  margin: 0 0 24px;
}
.blog-meta {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  margin: 0 0 25px;
}
.blog-copy > p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--body);
  margin-bottom: 22px;
}
.blog-copy .blog-read {
  color: var(--body);
  margin-top: 24px;
}
@media (max-width: 760px) {
  .blogs-grid {
    gap: 42px;
  }
  .blog-copy {
    padding: 22px 0 0;
  }
  .blog-card h2 {
    font-size: 28px;
    margin-bottom: 18px;
  }
  .blog-meta {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .blog-date-badge {
    min-width: 70px;
    padding: 10px 13px;
    font-size: 12px;
  }
  .blog-date-badge strong {
    font-size: 28px;
  }
}

/* Reference video posts, ready for a local or hosted video file. */
.blog-video-trigger {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
}
.blog-video-label {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #000;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
}
.blog-video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 70%);
  border: 1px solid #fff;
  border-radius: 50%;
  transition:
    background-color 200ms ease,
    transform 200ms ease;
}
.blog-video-play svg {
  width: 26px;
  height: 26px;
}
.blog-video-trigger:hover .blog-video-play {
  background: #000;
  transform: scale(1.06);
}
.blog-video-preview {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--body);
  font: inherit;
  font-size: 14px;
}
/* Standalone video pages; playback is controlled by the visitor. */
.video-post-figure {
  margin: 0 0 28px;
}
.video-post-figure video {
  display: block;
  width: 100%;
  max-height: 70vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}
.video-post-figure figcaption {
  margin-top: 14px;
  color: var(--body);
  font-size: 14px;
}
.video-post-page {
  padding-bottom: 40px;
}
@media (prefers-reduced-motion: reduce) {
  .blog-video-play {
    transition: none;
  }
}

/* Related video cards use the regular related-story layout. */
.related-video-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.related-video-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-videos .related-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgb(0 0 0 / 70%);
  color: #fff;
  line-height: 1;
  pointer-events: none;
}
.related-videos .related-video-play svg {
  display: block;
  width: 24px;
  height: 24px;
  transform: translateX(1px);
}
.related-videos .related-video-label {
  margin: 0;
  line-height: 1.4;
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  background: #000;
  color: #fff;
  font-size: 11px;
}
