/* Blog: the /blog/ gallery and blog posts. Builds on optra-events.css and
   optra-article.css. Generated pages: _tools/build-content-pages.py. */

/* ── Post body ────────────────────────────────────────────────────────── */

.ar-body .bl-intro {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 600;
  color: var(--ev-ink);
}

.ar-body ol {
  margin: 0 0 16px;
  padding-left: 1.5rem;
  list-style: decimal;
}

.ar-body ol li::marker {
  font-weight: 700;
  color: var(--ev-teal-dark);
}

.bl-table-wrap {
  overflow-x: auto;
  margin: 8px 0 24px;
  border: 1px solid var(--ev-line);
  border-radius: 12px;
  background: #fff;
}

.bl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
}

.bl-table th,
.bl-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ev-line);
}

.bl-table tr:last-child th,
.bl-table tr:last-child td {
  border-bottom: 0;
}

.bl-table thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ev-muted);
  background: var(--ev-bg);
}

.bl-table tbody th {
  width: 7rem;
  font-weight: 800;
  color: var(--ev-teal-dark);
}

.ar-body h2[id] {
  scroll-margin-top: 96px;
}

.bl-faq h3:first-of-type {
  margin-top: 0;
}

.bl-cta {
  margin: 48px 0 0;
  padding: 24px 28px;
  border-left: 4px solid var(--ev-teal);
  border-radius: 12px;
  background: var(--ev-teal-tint);
}

.bl-cta p {
  margin: 0 0 16px;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.bl-cta .ev-btn-primary {
  width: auto;
}

.bl-about {
  margin: 32px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--ev-line);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ev-muted);
}

/* ── Gallery ──────────────────────────────────────────────────────────── */

.bl-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bl-card {
  display: flex;
}

/* Text-only tile: a teal edge on top, category, title, a clamped excerpt,
   then date and read time pinned to the bottom so a row of cards lines up */
.ev-main .bl-card a {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--ev-line);
  border-radius: 14px;
  background: #fff;
  color: var(--ev-text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ev-main .bl-card a::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #15254a 0%, #1a8a9a 100%);
}

.ev-main .bl-card a:hover {
  border-color: var(--ev-teal);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.ev-main .bl-card a:focus-visible {
  outline: 3px solid rgba(26, 138, 154, 0.45);
  outline-offset: 2px;
}

.bl-card-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 24px 20px;
}

.bl-card-tag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ev-teal-dark);
}

.bl-card-badge {
  padding: 0 8px;
  border-radius: 999px;
  line-height: 18px;
  background: var(--ev-teal-tint);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ev-teal-dark);
}

.bl-card h2 {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ev-ink);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bl-card-excerpt {
  display: -webkit-box;
  margin: 0 0 20px;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bl-card-meta {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ev-line);
  font-size: 13px;
  color: var(--ev-muted);
}

.bl-card-more {
  position: absolute;
  right: 24px;
  bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ev-teal-dark);
}

.bl-card a:hover .bl-card-more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

  .bl-card-text,
  .bl-cta {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ev-main .bl-card a {
    transition: none;
  }

  .ev-main .bl-card a:hover {
    transform: none;
  }
}
