/* ============================================================
   Ocean Area Living — Blog (index + articles)
   Builds on legal.css (.lg-*) so the blog matches the site's
   editorial pages. Scoped to .bl-* so nothing else is affected.
   ============================================================ */

/* ---------- Article header ---------- */
.bl-head .lg-folio a { color: inherit; border-bottom: 1px solid var(--navy-line); padding-bottom: 2px; }
.bl-head .lg-folio a:hover { border-bottom-color: var(--navy); }
.bl-h1 { max-width: 24ch; text-wrap: balance; }

/* ---------- Article body (imported WordPress HTML) ---------- */
.bl-body h2 { margin-top: 44px; }
.bl-body h3, .bl-body h4 {
  font-family: var(--font-display); font-weight: 400;
  color: var(--navy); line-height: 1.3;
  margin: 36px 0 14px;
}
.bl-body h3 { font-size: 21px; }
.bl-body h4 { font-size: 18px; }
.bl-body > :first-child { margin-top: 0; }

.bl-body img {
  display: block; max-width: 100%; height: auto;
  margin: 28px 0;
}
.bl-body img.bl-emoji {
  display: inline-block; width: 1.15em; height: 1.15em;
  margin: 0 .12em; vertical-align: -.2em;
}
.bl-body figure { margin: 28px 0; }
.bl-body figure img { margin: 0; }
.bl-body figcaption {
  font-family: var(--font-ui); font-size: 13px; color: var(--ink);
  opacity: .75; margin-top: 10px;
}

.bl-body ol { margin: 0 0 22px; padding-left: 1.4em; list-style: decimal; }
.bl-body ol > li { padding-left: 4px; }
.bl-body ol > li::before { display: none; }

.bl-body blockquote {
  margin: 0 0 22px; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--dusted-deep);
  font-family: var(--font-voice); font-style: italic;
  font-size: 19px; line-height: 1.55; color: var(--navy);
}

.bl-body table {
  display: block; width: 100%; overflow-x: auto;
  border-collapse: collapse; margin: 0 0 28px;
  font-family: var(--font-ui); font-size: 14.5px; line-height: 1.6; color: var(--ink);
}
.bl-body th, .bl-body td {
  padding: 10px 14px 10px 0; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--navy-line);
}
.bl-body th { font-weight: 600; color: var(--navy); }

/* Original photos stay hidden until the file loads (see blog.js), so a
   photo that hasn't been restored leaves no gap and no placeholder.
   !important: ".bl-body img { display:block }" would otherwise beat the
   browser's own [hidden] rule. */
.bl-body img[hidden], .bl-body a[hidden] { display: none !important; }

/* ---------- Blog index ---------- */
.bl-index-body { max-width: var(--page-max); margin: 0 auto; padding: 0 64px 120px; }
.bl-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
}
.bl-card a { display: flex; flex-direction: column; height: 100%; color: var(--navy); }
/* Default = clean text-only card: a hairline rule and a small brand mark.
   No empty photo box. When the original featured photo exists at the card's
   data-img path, blog.js adds .has-img and the photo frame appears. */
.bl-card { border-top: 1px solid var(--navy-line); padding-top: 18px; }
/* The cards' own top rules divide the list from the intro, so the page-level
   rule would only add a second line and an empty-looking band above them. */
.bl-index-body > .lg-rule { display: none; }
.bl-card-media { position: relative; display: block; }
.bl-card.has-img { border-top: 0; padding-top: 0; }
.bl-card.has-img .bl-card-media {
  aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--paper);
}
.bl-card-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.bl-card a:hover .bl-card-media img { transform: scale(1.03); }
.bl-card-mark {
  font: 500 10px/1.2 var(--font-ui);
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--navy); opacity: .55;
}
.bl-card-date {
  display: block; margin: 20px 0 8px;
  font: 500 10.5px/1.2 var(--font-ui);
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--navy); opacity: .65;
}
.bl-card-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 21px; line-height: 1.3;
  color: var(--navy);
  text-wrap: pretty;
}
.bl-card a:hover .bl-card-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.bl-card a:focus-visible { outline: 1px solid var(--navy); outline-offset: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .bl-index-body { padding: 0 40px 96px; }
  .bl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .bl-index-body { padding: 0 24px 72px; }
  .bl-body h3 { font-size: 19px; }
}
@media (max-width: 600px) {
  .bl-list { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-card-media img { transition: none; }
}
