/* Blog Styling
   Extends the site design for blog posts and listing pages
*/

/* Show dark logo on blog pages (light background) */
.blog-page .header-logo-image.tablet-hide {
  opacity: 0 !important;
  visibility: hidden !important;
}

.blog-page .header-logo-dark {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 1 !important;
}

/* Dark navigation text on blog pages */
.blog-page .navigation-link,
.blog-page .navigation-link div {
  color: #221e20 !important;
}

.blog-page .navigation-link:hover,
.blog-page .navigation-link:hover div {
  color: #514f56 !important;
}

/* ==================== BLOG LISTING PAGE ==================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

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

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-date {
  font-size: 0.875rem;
  color: #87969c;
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-family: Poppins, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #221e20;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 0.9375rem;
  color: #514f56;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #87969c;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-link:hover {
  color: #56666d;
}

/* ==================== BLOG POST PAGE ==================== */

/* Article container */
.blog-article {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  text-align: left;
}

/* Post header */
.blog-header {
  margin-bottom: 2.5rem;
  text-align: left;
}

.blog-date {
  font-size: 0.9375rem;
  color: #87969c;
  margin-bottom: 1rem;
}

.blog-title {
  font-family: Poppins, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #221e20;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.blog-subtitle {
  font-size: 1.25rem;
  color: #514f56;
  line-height: 1.5;
}

/* Body text */
.blog-article p {
  color: #514f56;
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-top: 0;
  margin-bottom: 1.25rem;
  text-align: left;
}

/* Headings */
.blog-article h2 {
  font-family: Poppins, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #221e20;
}

.blog-article h3 {
  font-family: Poppins, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #221e20;
}

/* Strong text */
.blog-article strong {
  color: #221e20;
  font-weight: 600;
}

/* Emphasis */
.blog-article em {
  font-style: italic;
}

/* Links */
.blog-article a {
  color: #87969c;
  text-decoration: underline;
  transition: color 0.2s;
}

.blog-article a:hover {
  color: #56666d;
}

/* Lists */
.blog-article ul,
.blog-article ol {
  color: #514f56;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Blockquotes */
.blog-article blockquote {
  border-left: 3px solid #87969c;
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: #f9f9f9;
  font-style: italic;
  color: #514f56;
}

.blog-article blockquote p {
  margin: 0;
}

/* Tables */
.blog-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.blog-article th,
.blog-article td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.blog-article th {
  font-weight: 600;
  color: #221e20;
  background: #f9f9f9;
}

.blog-article td {
  color: #514f56;
}

.blog-article tr:hover td {
  background: #fafafa;
}

/* Images */
.blog-article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.blog-article figure {
  margin: 2rem 0;
}

.blog-article figcaption {
  font-size: 0.875rem;
  color: #87969c;
  text-align: center;
  margin-top: 0.75rem;
}

/* Image comparison grid */
.image-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.image-comparison figure {
  margin: 0;
}

.image-comparison img {
  margin: 0;
  width: 100%;
}

/* Horizontal rule */
.blog-article hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 3rem 0;
}

/* Sources section */
.blog-sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.blog-sources h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.blog-sources ul {
  list-style: none;
  padding-left: 0;
}

.blog-sources li {
  margin-bottom: 0.5rem;
}

/* Back to blog link */
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: #87969c;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.blog-back:hover {
  color: #56666d;
}

.blog-back svg {
  width: 16px;
  height: 16px;
}

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

@media screen and (max-width: 767px) {
  .blog-title {
    font-size: 1.875rem;
  }

  .blog-subtitle {
    font-size: 1.125rem;
  }

  .blog-article h2 {
    font-size: 1.25rem;
  }

  .blog-article h3 {
    font-size: 1.125rem;
  }

  .blog-article p {
    font-size: 1rem;
  }

  .blog-article table {
    font-size: 0.875rem;
  }

  .blog-article th,
  .blog-article td {
    padding: 0.5rem;
  }

  .image-comparison {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}
