/* Shared styles for Lambda-generated blog listing and detail pages. */

.blog-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.blog-page {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 42%);
  color: #0f172a;
  padding-top: 80px;
}

.blog-page .brand-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
}

.blog-hero {
  padding: 5.5rem 0 3rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #0369a1;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-kicker::before {
  width: 2rem;
  height: 2px;
  content: "";
  background: #0ea5e9;
}

.blog-title {
  max-width: 900px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.5rem, 6vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.blog-intro {
  max-width: 720px;
  margin: 1.2rem 0 0;
  color: #475569;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.75;
}

.blog-listing {
  padding: 3rem 0 5rem;
}

.blog-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.blog-section-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.blog-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.blog-filter-field {
  display: grid;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-filter-select {
  min-width: 150px;
  min-height: 2.55rem;
  padding: 0 2.2rem 0 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.blog-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 1rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.blog-filter-chip:hover,
.blog-filter-chip.is-active {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #075985;
}

.blog-date-filter {
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font: inherit;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.blog-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-card[hidden] {
  display: none !important;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.36);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.blog-tag {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-card-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.blog-card-summary {
  margin: 0.75rem 0 1.1rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.65;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  color: #64748b;
  font-size: 0.84rem;
}

.blog-card-cta {
  display: inline-flex;
  margin-top: 1rem;
  color: #0369a1;
  font-weight: 700;
}

.blog-empty {
  padding: 3rem;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
  text-align: center;
}

.blog-article-hero {
  padding: 4rem 0 2rem;
}

.blog-article-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  align-items: start;
}

.blog-article-heading {
  max-width: 900px;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #0369a1;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.blog-back-link::before {
  content: "\2190";
  font-size: 1rem;
}

.blog-back-link:hover {
  color: #075985;
}

.blog-article-title {
  max-width: 900px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.1;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1.35rem;
  color: #64748b;
  font-size: 0.95rem;
}

.blog-article-image {
  overflow: hidden;
  width: min(100%, 980px);
  margin-top: 0.2rem;
  border-radius: 1rem;
  background: #e2e8f0;
  box-shadow: 0 22px 64px rgba(15, 23, 42, 0.12);
}

.blog-article-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  gap: 3rem;
  align-items: start;
  padding: 2.5rem 0 5rem;
}

.blog-article-content {
  color: #243041;
  font-size: 1.04rem;
  line-height: 1.82;
}

.blog-article-content h2 {
  margin: 2.6rem 0 0.8rem;
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.blog-article-content h3 {
  margin: 2rem 0 0.65rem;
  color: #1e293b;
  font-size: 1.3rem;
  line-height: 1.28;
  letter-spacing: 0;
}

.blog-article-content p {
  margin: 0 0 1.15rem;
}

.blog-article-content a {
  color: #0369a1;
  font-weight: 700;
}

.blog-article-content ul,
.blog-article-content ol {
  margin: 0 0 1.35rem 1.3rem;
  padding: 0;
}

.blog-article-content li {
  margin: 0.45rem 0;
  padding-left: 0.25rem;
}

.blog-article-content img {
  width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 0.8rem;
}

.blog-side-panel {
  position: sticky;
  top: 7rem;
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.blog-side-panel h2,
.blog-side-panel h3 {
  margin: 0 0 0.9rem;
  color: #0f172a;
  font-size: 1rem;
  letter-spacing: 0;
}

.blog-side-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-side-list a {
  color: #475569;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.blog-side-list a:hover {
  color: #0369a1;
}

.blog-related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
}

.blog-related-section h2 {
  margin: 0 0 1.2rem;
  color: #0f172a;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.blog-cta-band {
  margin: 2.5rem 0 0;
  padding: 2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
}

.blog-cta-band h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.blog-cta-band p {
  max-width: 680px;
  margin: 0.65rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.blog-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.blog-cta-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 980px) {
  .blog-toolbar,
  .blog-article-header,
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .blog-filter-panel {
    justify-content: flex-start;
  }

  .blog-article-image {
    margin-top: 0;
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-side-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .blog-shell {
    width: min(100% - 28px, 1180px);
  }

  .blog-hero,
  .blog-article-hero {
    padding-top: 3.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .blog-filter-field,
  .blog-filter-select,
  .blog-date-filter {
    width: 100%;
    justify-content: center;
  }

  .blog-card-body,
  .blog-cta-band {
    padding: 1.1rem;
  }
}
