/* ========================================
   PSOS Blog Styles
   Uses design tokens from variables.css (loaded via main.css)
   ======================================== */

/* ========================================
   BLOG PROSE — Article Content Styling
   ======================================== */

.blog-prose {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-dark);
  max-width: 100%;
}

.blog-prose > * + * {
  margin-top: 1.5em;
}

.blog-prose h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--navy);
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  line-height: var(--leading-tight);
}

.blog-prose h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--navy);
  margin-top: 2em;
  margin-bottom: 0.5em;
  line-height: var(--leading-tight);
}

.blog-prose h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--navy);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.blog-prose p {
  margin-top: 1.25em;
  margin-bottom: 0;
}

.blog-prose a {
  color: var(--retro-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.blog-prose a:hover {
  color: var(--retro-coral);
}

.blog-prose strong {
  font-weight: var(--weight-semibold);
  color: var(--navy);
}

.blog-prose ul,
.blog-prose ol {
  padding-left: 1.5em;
  margin-top: 1.25em;
}

.blog-prose li {
  margin-top: 0.5em;
}

.blog-prose li::marker {
  color: var(--retro-teal);
}

.blog-prose blockquote {
  border-left: 4px solid var(--retro-teal);
  padding: var(--space-md) var(--space-lg);
  margin: 1.5em 0;
  background-color: var(--cream);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-dark);
}

.blog-prose blockquote p {
  margin-top: 0;
}

.blog-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: var(--border-thick) solid var(--navy);
  box-shadow: var(--shadow-retro-sm);
  margin: 1.5em 0;
}

.blog-prose code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  background-color: var(--cream);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-prose pre {
  background-color: var(--navy);
  color: var(--primary-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 1.5em 0;
  border: var(--border-thick) solid var(--navy);
  box-shadow: var(--shadow-retro-sm);
}

.blog-prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.875em;
}

.blog-prose hr {
  border: none;
  border-top: 2px solid var(--cream);
  margin: 2.5em 0;
}

/* Responsive tables */
.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: var(--text-sm);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-prose thead {
  background-color: var(--navy);
  color: var(--primary-white);
}

.blog-prose th {
  padding: 0.75em 1em;
  text-align: left;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.blog-prose td {
  padding: 0.75em 1em;
  border-bottom: 1px solid var(--cream);
}

.blog-prose tbody tr:nth-child(even) {
  background-color: var(--cream);
}

/* ========================================
   BLOG POST HERO
   ======================================== */

.blog-post-hero {
  padding-bottom: 0;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-md);
}

.blog-meta-sep {
  color: var(--text-muted);
}

.blog-tag {
  color: var(--retro-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-tag:hover {
  color: var(--retro-coral);
  text-decoration: underline;
}

.blog-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: var(--border-thick) solid var(--navy);
  box-shadow: var(--shadow-retro-md);
}

.blog-post-hero-image {
  background: linear-gradient(135deg, var(--cream) 0%, var(--primary-white) 100%);
  padding: var(--space-lg) 0 var(--space-xl);
}

/* ========================================
   BLOG CARD
   ======================================== */

.blog-card {
  background: var(--primary-white);
  border: var(--border-thick) solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-retro-sm);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-retro-md);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-image {
  overflow: hidden;
  border-bottom: var(--border-medium) solid var(--navy);
}

.blog-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-badge {
  align-self: flex-start;
  margin-bottom: var(--space-sm);
  font-size: var(--text-xs);
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--navy);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-sm);
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-dark);
  line-height: var(--leading-relaxed);
  flex: 1;
  margin-bottom: var(--space-md);
}

.blog-card-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: auto;
}

/* ========================================
   BLOG GRID
   ======================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

/* ========================================
   BLOG CTA
   ======================================== */

.blog-cta {
  background-color: var(--cream);
  border: var(--border-thick) solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-retro-sm);
  padding: var(--space-xl);
  text-align: center;
  margin: 2em 0;
}

.blog-cta-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

.blog-cta-text {
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   BLOG SHARE
   ======================================== */

.blog-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--cream);
}

.blog-share-label {
  font-size: var(--text-sm);
}

.blog-share-buttons {
  display: flex;
  gap: var(--space-sm);
}

.blog-share-btn,
.blog-share-btn:hover,
.blog-share-btn:focus {
  text-decoration: none !important;
}

.blog-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--primary-white);
  border: var(--border-thin) solid var(--navy);
  border-radius: var(--radius-md);
  color: var(--navy);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-retro-sm);
}

.blog-share-btn:hover {
  transform: translateY(-2px);
}

.blog-share-btn svg {
  fill: currentColor;
}

.blog-share-linkedin:hover {
  background-color: #0077B5;
  color: var(--primary-white);
  border-color: #0077B5;
  box-shadow: 2px 2px 0px #005a8c;
}

.blog-share-facebook:hover {
  background-color: #1877F2;
  color: var(--primary-white);
  border-color: #1877F2;
  box-shadow: 2px 2px 0px #1260c4;
}

.blog-share-email:hover {
  background-color: var(--retro-coral);
  color: var(--primary-white);
  border-color: var(--retro-coral);
  box-shadow: var(--shadow-retro-coral);
}

/* ========================================
   BLOG AUTHOR BIO
   ======================================== */

.blog-author-bio {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background-color: var(--cream);
  border: var(--border-thick) solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-retro-sm);
  margin-top: var(--space-xl);
}

.blog-author-photo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: var(--border-medium) solid var(--navy);
  object-fit: cover;
  flex-shrink: 0;
}

.blog-author-name {
  margin-bottom: var(--space-xs);
}

.blog-author-desc {
  max-width: 100%;
}

/* ========================================
   BLOG NEWSLETTER
   ======================================== */

.blog-newsletter {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.blog-newsletter-form {
  justify-content: center;
}

/* ========================================
   BLOG PAGINATION
   ======================================== */

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.blog-pagination-placeholder {
  width: 140px;
}

.blog-pagination-info {
  min-width: 100px;
  text-align: center;
}

/* ========================================
   BLOG CATEGORY FILTER
   ======================================== */

.blog-category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.blog-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy);
  background: var(--primary-white);
  border: var(--border-thin) solid var(--navy);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.blog-filter-pill:hover,
.blog-filter-pill.active {
  background: var(--navy);
  color: var(--primary-white);
}

/* ========================================
   BLOG BREADCRUMB
   ======================================== */

.blog-breadcrumb {
  padding: var(--space-sm) 0;
  background-color: var(--cream);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.blog-breadcrumb-list a {
  color: var(--retro-teal);
  text-decoration: none;
}

.blog-breadcrumb-list a:hover {
  text-decoration: underline;
}

/* ========================================
   RESPONSIVE
   ======================================== */

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

  .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .blog-meta-sep {
    display: none;
  }

  .blog-share {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .blog-newsletter-form {
    flex-direction: column;
  }

  .blog-category-filter {
    gap: var(--space-xs);
  }

  .blog-filter-pill {
    font-size: var(--text-xs);
    padding: 0.5rem 0.875rem;
  }

  .blog-pagination {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .blog-pagination-placeholder {
    display: none;
  }
}

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