/*
 * Blog detail - single post layout (breadcrumb/byline header, hero image,
 * two-column article + sticky "Recent Posts" rail). Scoped to .vm-bd so it
 * won't restyle anything else; enqueued only for is_singular('post') via
 * vm_page_font_css() in functions.php. Rendered by single.php.
 *
 * Colors/fonts pull the same tokens as the rest of the site (--red,
 * --red-dark, --font-display, --font-body, --container-width, all defined
 * in style.css) instead of a separate palette/typeface.
 */

.vm-bd,
.vm-bd * {
  box-sizing: border-box;
}

.vm-bd {
  --vm-bd-accent: var(--red, #8D0101);
  --vm-bd-accent-dark: var(--red-dark, #621C15);
  --vm-bd-max: var(--container-width, 1200px);
  width: 100%;
  margin: 0;
  background: #fff;
  color: var(--text, #1a1a1a);
  font-family: var(--font-body, Arial, Helvetica, sans-serif);
  line-height: 1.5;
  container-type: inline-size;
}

.vm-bd h1,
.vm-bd h2,
.vm-bd h3,
.vm-bd p,
.vm-bd a,
.vm-bd figure,
.vm-bd ul,
.vm-bd ol,
.vm-bd li,
.vm-bd blockquote {
  margin: 0;
  /* padding: 0; */
  border: 0;
  /* background: transparent; */
  box-shadow: none;
}

.vm-bd a {
  color: var(--vm-bd-accent);
  text-decoration: none;
}

.vm-bd a:hover,
.vm-bd a:focus-visible {
  color: var(--vm-bd-accent-dark);
  outline: none;
}

.vm-bd a.vm-bd__rail-lead,
.vm-bd a.vm-bd__rail-item {
  color: inherit;
}

.vm-bd__inner {
  width: 100%;
  max-width: var(--vm-bd-max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 64px) clamp(48px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
}

.vm-bd__header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
}

.vm-bd__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8a8a92;
}

.vm-bd__crumbs a {
  color: var(--vm-bd-accent);
}

.vm-bd__crumbs-current {
  color: #2a2a2e;
}

.vm-bd__title {
  font-family: 'Khand', var(--font-display, sans-serif);
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--black, #111111);
  text-wrap: pretty;
}

.vm-bd__byline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.vm-bd__avatar,
.vm-bd__photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  overflow: hidden;
  background: #f0f0f2;
}

.vm-bd__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 13px;
  color: #4a4a52;
}

.vm-bd__photo {
  object-fit: cover;
  display: block;
}

.vm-bd__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vm-bd__name {
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--black, #111111);
}

.vm-bd__dates {
  font-size: 13px;
  color: #7a7a82;
}

.vm-bd__pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f6eceb;
  color: var(--vm-bd-accent);
  font-family: var(--font-display, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vm-bd__pill:hover,
.vm-bd__pill:focus-visible {
  color: var(--vm-bd-accent-dark);
}

.vm-bd__hero {
  max-width: 1000px;
}

/* Rounded corners + a red glow shadow (matches the site's existing
   featured-image treatment) rather than the plain flat frame - overflow
   hidden still clips the image to the radius; the shadow renders outside
   that on the box itself. */
.vm-bd__hero-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 530;
  border-radius: 30px;
  overflow: hidden;
  background: #f0f0f2;
  /* box-shadow: 1px 0 8px 1px rgba(141, 1, 1, 0.53); */
}

.vm-bd__hero-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vm-bd__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}

.vm-bd__content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.vm-bd__content p,
.vm-bd__content li {
  font-size: 16.5px;
  line-height: 1.75;
  color: #3a3a41;
  text-wrap: pretty;
}

.vm-bd__content h2 {
    margin: 14px 0 0;
    font-family: 'Khand', var(--font-display, sans-serif);
    font-weight: 500;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--black, #111111);
}

.vm-bd__content h3 {
    font-family: var(--wix-font-nuckle-regular);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.28;
    letter-spacing: -0.015em;
    color: var(--black, #111111);
}

.vm-bd__content ul,
.vm-bd__content ol {
  padding-left: 1.25em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vm-bd__content blockquote {
  padding: 8px 0 8px 20px;
  border-left: 3px solid var(--vm-bd-accent);
  color: #1c1c20;
  font-weight: 500;
}

.vm-bd__content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Share row, reusing the site's existing .post-share-icons/.share-icon
   styles (custom.css) as-is - unscoped selectors, so they still work
   sitting inside .vm-bd__content. */
.vm-bd__content .post-share-icons {
  padding-top: 8px;
  border-top: 1px solid var(--border-grey, #e3e3e3);
}

.vm-bd__rail-wrap {
  align-self: stretch;
  min-width: 0;
}

.vm-bd__rail {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--light-grey, #f5f5f5);
  border-radius: 20px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.vm-bd__rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.vm-bd__rail-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--black, #111111);
}

.vm-bd__rail-all {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vm-bd-accent);
}

.vm-bd__rail-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border-radius: 14px;
  color: inherit;
  transition: box-shadow 0.18s;
}

.vm-bd__rail-lead:hover,
.vm-bd__rail-lead:focus-visible {
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.4);
  color: inherit;
}

.vm-bd__rail-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 667;
  border-radius: 10px;
  overflow: hidden;
  background: #eeeef0;
  flex: none;
}

.vm-bd__rail-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vm-bd__rail-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vm-bd__rail-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vm-bd-accent);
}

.vm-bd__rail-name {
    font-family: var(--wix-font-nuckle-regular);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    color: var(--black, #111111);
    text-wrap: pretty;
    transition: color 0.18s;
}

.vm-bd__rail-lead:hover .vm-bd__rail-name,
.vm-bd__rail-item:hover .vm-bd__rail-name {
  color: var(--vm-bd-accent);
}

.vm-bd__rail-list {
  display: flex;
  flex-direction: column;
}

.vm-bd__rail-item {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid #e2e2e6;
  color: inherit;
}

.vm-bd__rail-item:hover,
.vm-bd__rail-item:focus-visible {
  color: inherit;
}

.vm-bd__rail-num {
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 14px;
  color: #c9c9d0;
  flex: none;
}

.vm-bd__rail-item .vm-bd__rail-copy {
  gap: 5px;
}

.vm-bd__rail-item .vm-bd__rail-name {
  font-size: 15px;
  line-height: 1.32;
}

.vm-bd__rail-meta {
  font-size: 12px;
  color: #8a8a92;
}

@media (max-width: 900px) {
  .vm-bd__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vm-bd__rail {
    position: static;
    max-height: none;
  }

  .vm-bd__rail-lead {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .vm-bd__rail-lead .vm-bd__rail-thumb {
    width: 300px;
    max-width: 42%;
  }

  .vm-bd__rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}

@media (max-width: 560px) {
  .vm-bd__inner {
    padding: 28px 16px 40px;
  }

  .vm-bd__rail-lead {
    flex-direction: column;
    align-items: stretch;
  }

  .vm-bd__rail-lead .vm-bd__rail-thumb {
    width: 100%;
    max-width: none;
  }

  .vm-bd__rail-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .vm-bd__content h2 {
    font-size: 22px;
  }
}

@container (max-width: 900px) {
  .vm-bd__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vm-bd__rail {
    position: static;
    max-height: none;
  }

  .vm-bd__rail-lead {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .vm-bd__rail-lead .vm-bd__rail-thumb {
    width: 300px;
    max-width: 42%;
  }

  .vm-bd__rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}

@container (max-width: 560px) {
  .vm-bd__rail-lead {
    flex-direction: column;
    align-items: stretch;
  }

  .vm-bd__rail-lead .vm-bd__rail-thumb {
    width: 100%;
    max-width: none;
  }

  .vm-bd__rail-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
