/* Blog list and blog posts. Desktop values are Wix's pixels at 1440px wide.
   Phone values (rem) are Wix's mobile pixels: 1rem = 1/320 of the screen. */

/* Extra weights the blog needs: Corben bold (post headings), Nunito Sans heavy and
   italic (stand-in for Avenir), Josefin Sans italic (stand-in for Brandon Grotesque). */
/* Extra fonts (Corben 700, Josefin Sans italic, Nunito Sans italic) load from the front matter `fonts` value. */

.b-page { font-weight: 300; --b-line: rgba(204, 204, 204, 0.75); --b-rule: rgba(64, 64, 65, 0.2); --b-sage-dark: rgb(117, 138, 125); }
.b-page--list { background: #efd7cd; }
.b-page--post { background: var(--cream); }

.b-col { width: 980px; max-width: 100%; margin: 0 auto; padding: 0 20px 20px; background: var(--white); }

/* Category menu */
.b-cats { display: flex; gap: 40px; height: 80px; padding-top: 29px; font-family: var(--font-small); font-size: 16px; line-height: 22.4px; }
.b-page--post .b-cats { padding-top: 30px; font-size: 14px; line-height: 19.6px; }
.b-cats a { color: var(--ink); text-decoration: none; }
.b-cats a:hover, .b-cats a[aria-current="page"] { color: var(--sage); }

/* Phone-only category bar */
.b-mbar, .b-mcats { display: none; }

.b-dot { margin: 0 7px; }

/* ---------- Blog list ---------- */

.b-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 32px; }

.b-card {
  position: relative; display: grid; grid-template-columns: 317px 1fr; height: 239px;
  border: 1px solid var(--b-line); background: var(--white);
}
.b-card__img { width: 318px; height: 239px; margin: -1px 0 0 -1px; max-width: none; object-fit: cover; }
.b-card__imglink { display: block; }

/* Empty category (Wix shows this for a category with no posts yet). */
.b-col:has(.b-empty) { min-height: 530px; }
.b-empty { height: 430px; padding-top: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--ink); }
.b-empty h2 { font-size: 32px; line-height: 40px; color: var(--ink); }
.b-empty p { margin-top: 12px; font-family: var(--font-small); font-size: 16px; font-weight: 300; line-height: 22px; }
.b-card__text { position: relative; padding: 34px 36px 0 35px; font-family: var(--font-small); color: var(--ink); }
.b-card__meta { font-size: 12px; line-height: 15px; }
.b-card__meta .b-dot { margin: 0 8px; }
.b-card__clip {
  height: 97px; margin-top: 22px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 67px, transparent 97px);
  mask-image: linear-gradient(#000 67px, transparent 97px);
}
.b-card h2 { font-size: 28px; line-height: 52px; color: var(--ink); }
.b-card h2 a { text-decoration: none; }
.b-card h2 a::after { content: ""; position: absolute; inset: 0; }
.b-card__excerpt { margin-top: 12px; font-size: 16px; line-height: 24px; }
.b-card hr { position: absolute; top: 179px; left: 35px; right: 36px; margin: 0; border: 0; border-top: 1px solid var(--b-rule); }

/* Category pages use Wix's larger card: 940x341 with a wider photo and a 3-line excerpt. */
@media (min-width: 761px) {
  .b-list--wide .b-card { grid-template-columns: 454px 1fr; height: 341px; }
  .b-list--wide .b-card__img { width: 455px; height: 341px; }
  .b-list--wide .b-card__clip { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .b-list--wide .b-card__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .b-list--wide .b-card hr { top: 282px; }
}

/* ---------- Post ---------- */

/* Wix keeps trailing spaces in post text and lets them wrap; copied so lines break the same. */
.b-body p, .b-body li { white-space: break-spaces; }

.b-post { margin-top: 20px; padding: 60px 99px 60px; border: 1px solid var(--b-line); font-family: var(--font-small); color: var(--ink); }

.b-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 21px; }
.b-meta__avatar { width: 32px; height: 32px; border-radius: 50%; }
.b-meta .b-dot { margin: 0 6px; }

.b-post h1 { margin-top: 18px; font-family: var(--font-small); font-size: 40px; font-weight: 700; line-height: 56px; color: var(--ink); }
.b-updated { margin-top: 18px; font-size: 14px; line-height: 21px; }

.b-body { margin-top: 20px; font-size: 18px; line-height: 27px; }
.b-body > * { margin: 0 0 27px; }
.b-body > :last-child { margin-bottom: 0; }
.b-body > .b-flush { margin-bottom: 0; }
.b-body > .b-gap { padding-top: 27px; }
.b-body > .b-gap2 { padding-top: 54px; }
.b-body figure img { width: 100%; }
.b-body h3 { font-size: 22px; font-weight: 700; line-height: 30.8px; color: var(--ink); }
.b-body h3.b-light { font-weight: 400; }
.b-body h4 { font-family: var(--font-menu); font-size: 20px; font-weight: 400; font-style: italic; line-height: 28px; color: var(--b-sage-dark); }
.b-body .b-sage { color: var(--b-sage-dark); }
.b-body strong { font-weight: 700; }
.b-link-sage, .b-link-light { font-weight: 700; text-decoration: underline; }
.b-link-sage { color: var(--b-sage-dark); }
.b-link-light { color: var(--sage); }

.b-post__cat { margin-top: 24px; padding-left: 4px; font-size: 14px; line-height: 21px; }

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  .b-page--list { padding-bottom: 10rem; }
  .b-col { width: auto; padding: 0; }
  .b-cats { display: none; }

  .b-mbar {
    display: flex; align-items: center; height: 50rem; padding: 0 18rem;
    background: var(--sage); color: var(--white); font-family: var(--font-small); font-size: 14rem; line-height: 19.6rem;
  }
  .b-mcats { display: block; position: relative; border-top: 1px solid rgba(64, 64, 65, 0.3); font-family: var(--font-small); }
  .b-mcats summary {
    display: flex; align-items: center; height: 49rem; padding: 0 18rem; list-style: none; cursor: pointer;
    font-size: 16rem; line-height: 22.4rem; color: var(--ink);
  }
  .b-page--post .b-mcats summary { font-size: 14rem; line-height: 19.6rem; }
  .b-mcats summary::-webkit-details-marker { display: none; }
  .b-mcats summary::after {
    content: ""; margin-left: auto; margin-right: 4rem; width: 9rem; height: 9rem;
    border-right: 1.5rem solid var(--ink); border-bottom: 1.5rem solid var(--ink); transform: translateY(-3rem) rotate(45deg);
  }
  .b-mcats[open] summary::after { transform: translateY(2rem) rotate(-135deg); }
  .b-mcats nav {
    position: absolute; z-index: 2; left: 0; right: 0; display: flex; flex-direction: column;
    background: var(--white); border-top: 1px solid rgba(64, 64, 65, 0.3); box-shadow: 0 4rem 8rem rgba(0, 0, 0, 0.1);
  }
  .b-mcats nav a { padding: 12rem 18rem; font-size: 16rem; color: var(--ink); text-decoration: none; }

  .b-dot { margin: 0 7rem; }

  /* List */
  .b-list { margin: 0; gap: 0; }
  .b-card { display: block; height: auto; border: 0; padding-bottom: 30rem; }
  .b-card:last-child { padding-bottom: 25rem; }
  .b-card__img { width: 100%; height: auto; margin: 0; }
  /* Wix shows no message for an empty category on phones, just space before the footer. */
  .b-empty { display: none; }
  .b-col:has(.b-empty) { min-height: 252rem; }
  .b-card__text { padding: 40rem 18rem 0; }
  .b-card__meta { font-size: 12rem; line-height: 15rem; }
  .b-card__meta .b-dot { margin: 0 8rem; }
  .b-card__clip { height: auto; margin-top: 26.6rem; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .b-card h2 { font-size: 22rem; line-height: 30.8rem; letter-spacing: 0.018em; } /* Corben sets ~3% narrower here than on Wix */
  .b-card__excerpt {
    margin-top: 10.8rem; font-size: 14rem; line-height: 21rem;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  }
  .b-card hr { position: static; margin: 54rem 0 0; }

  /* Post */
  .b-post { margin: 0; padding: 32rem 18rem 40rem; border: 0; }
  .b-meta { gap: 12rem; font-size: 12rem; line-height: 18rem; }
  .b-meta__avatar { width: 32rem; height: 32rem; }
  .b-meta__text > span { display: block; }
  .b-meta .b-dot--author { display: none; }
  .b-meta .b-dot { margin: 0 6rem; }
  .b-post h1 { margin-top: 8rem; font-size: 26rem; line-height: 36.4rem; }
  .b-updated { margin-top: 8rem; font-size: 14rem; line-height: 21rem; }

  /* Nunito Sans sets about 3% wider than Wix's Avenir on phones; this keeps line breaks close. */
  .b-body { margin-top: 20rem; font-size: 16rem; line-height: 24rem; letter-spacing: -0.01em; }
  .b-body > * { margin-bottom: 24rem; }
  .b-body > .b-gap { padding-top: 24rem; }
  .b-body > .b-gap2 { padding-top: 48rem; }
  .b-body h3 { font-size: 20rem; line-height: 28rem; }
  .b-body h4 { font-size: 18rem; line-height: 25.2rem; }

  .b-post__cat { margin-top: 21rem; padding-left: 0; font-size: 14rem; line-height: 21rem; }
}
