/* ── PUBLIC BLOG & INSIGHTS RAIL ── */

:root {
  --pulse-orange: #E63946;
  --pulse-navy: #0a1e40;
  --blog-text-muted: #6b7280;
  --blog-bg-alt: #f7f8fc;
}

/* ── HOMEPAGE INSIGHTS RAIL ── */
.insights-rail {
  padding: 100px 60px;
  background: white;
  display: none; /* Shown if blogs exist */
}

@media (max-width: 768px) {
  .insights-rail {
    padding: 60px 24px;
  }
}

.insights-rail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.insights-rail-header .label-group .section-label {
  color: var(--pulse-orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.insights-rail-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--pulse-navy);
  line-height: 1.1;
  margin: 0;
}

.insights-rail-header .view-all {
  color: var(--pulse-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.insights-rail-header .view-all:hover {
  opacity: 0.7;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

/* ── BLOG CARD (Shared) ── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  border: 1px solid #e5e7eb;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.blog-card-img {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 16:9 approx */
  overflow: hidden;
  background: #f3f4f6;
}

.blog-card-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pulse-orange);
  margin-bottom: 12px;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pulse-navy);
  line-height: 1.3;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--blog-text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}

/* ── BLOG INDEX PAGE ── */
.blog-hero {
  background: var(--pulse-navy);
  color: white;
  padding: 120px 60px 80px;
  text-align: center;
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 24px 60px;
  }
}

.blog-hero .eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pulse-orange);
  margin-bottom: 16px;
  display: block;
}

.blog-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero p {
  font-size: 1.15rem;
  opacity: 0.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.blog-filters-bar {
  background: white;
  padding: 40px 60px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 68px;
  z-index: 10;
}

@media (max-width: 768px) {
  .blog-filters-bar {
    padding: 24px;
  }
}

.blog-filters-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

@media (max-width: 900px) {
  .blog-filters-container {
    flex-direction: column;
    align-items: stretch;
  }
}

.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 10px 20px;
  background: #f3f4f6;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pulse-navy);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: none;
}

.filter-pill:hover {
  background: #e5e7eb;
}

.filter-pill.active {
  background: var(--pulse-navy);
  color: white;
}

.blog-search {
  position: relative;
  min-width: 300px;
}

@media (max-width: 900px) {
  .blog-search {
    min-width: 0;
  }
}

.blog-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.blog-search input:focus {
  border-color: var(--pulse-orange);
}

.blog-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.blog-listing {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .blog-listing {
    padding: 60px 24px;
  }
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.load-more-container {
  text-align: center;
}

.btn-load-more {
  background: white;
  border: 1px solid var(--pulse-navy);
  color: var(--pulse-navy);
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-load-more:hover {
  background: var(--pulse-navy);
  color: white;
}

.blog-empty-state {
  text-align: center;
  padding: 100px 0;
  display: none;
}

.blog-empty-state h3 {
  font-size: 1.5rem;
  color: var(--pulse-navy);
  margin-bottom: 8px;
}

.blog-empty-state p {
  color: var(--blog-text-muted);
}

/* ── SINGLE BLOG POST PAGE ── */
.post-header {
  padding: 80px 60px 60px;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .post-header {
    padding: 60px 24px 40px;
  }
}

.post-breadcrumbs {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 32px;
  font-weight: 500;
}

.post-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.post-breadcrumbs a:hover {
  color: var(--pulse-navy);
}

.post-category-badge {
  display: inline-block;
  background: rgba(230, 57, 70, 0.1);
  color: var(--pulse-orange);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  text-decoration: none;
}

.post-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--pulse-navy);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.post-excerpt {
  font-size: 1.25rem;
  color: var(--blog-text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-featured-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  margin-bottom: 80px;
}

@media (max-width: 768px) {
  .post-featured-image {
    margin-bottom: 40px;
  }
}

.post-body {
  max-width: 760px;
  margin: 0 auto 80px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #374151;
}

@media (max-width: 768px) {
  .post-body {
    padding: 0 24px;
    font-size: 1.1rem;
  }
}

.post-body h2 {
  font-size: 1.8rem;
  color: var(--pulse-navy);
  margin: 48px 0 24px;
}

.post-body h3 {
  font-size: 1.4rem;
  color: var(--pulse-navy);
  margin: 32px 0 16px;
}

.post-body p {
  margin-bottom: 24px;
}

.post-body ul, .post-body ol {
  margin-bottom: 32px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 12px;
}

.post-body blockquote {
  border-left: 4px solid var(--pulse-orange);
  padding: 16px 24px;
  background: #f9fafb;
  font-style: italic;
  font-size: 1.25rem;
  margin: 40px 0;
  color: var(--pulse-navy);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 40px 0;
}

.post-tags {
  max-width: 760px;
  margin: 0 auto 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 24px;
}

.post-tag {
  background: #f3f4f6;
  color: #4b5563;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── RELATED POSTS ── */
.related-posts {
  background: var(--blog-bg-alt);
  padding: 100px 60px;
}

@media (max-width: 768px) {
  .related-posts {
    padding: 60px 24px;
  }
}

.related-posts-container {
  max-width: 1200px;
  margin: 0 auto;
}

.related-posts h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pulse-navy);
  margin-bottom: 48px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 404 / NOT FOUND ── */
.post-not-found {
  padding: 160px 24px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.post-not-found h1 {
  font-size: 3rem;
  color: var(--pulse-navy);
  margin-bottom: 16px;
}

.post-not-found p {
  font-size: 1.1rem;
  color: var(--blog-text-muted);
  margin-bottom: 32px;
}

.btn-back-to-blog {
  display: inline-block;
  background: var(--pulse-navy);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
}
