/* ============================================================
   BLOG CSS — blog-specific styling layered on top of shared.css
   ============================================================ */

/* ---- BLOG LISTING GRID ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.blog-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s;
}

.blog-card:hover { border-color: #0077cc; }

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

.blog-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0077cc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.blog-card h3 {
  color: #0a3d62;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  overflow-wrap: break-word;
}

.blog-card p {
  color: #555;
  font-size: 0.875rem;
  flex: 1;
  margin-bottom: 0.9rem;
  line-height: 1.65;
}

.blog-card-meta { font-size: 0.78rem; color: #888; }

/* ---- BLOG ARTICLE HERO ---- */
.blog-hero {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: clamp(1.75rem, 4vw, 2.5rem) 1rem;
  text-align: center;
}

.blog-title {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #0a3d62;
  line-height: 1.3;
  max-width: 860px;
  margin-inline: auto;
  overflow-wrap: break-word;
}

.blog-meta {
  margin-top: 0.75rem;
  color: #666;
  font-size: 0.875rem;
  line-height: 1.6;
}

.blog-meta--category {
  margin-bottom: 0.8rem;
}

.blog-category-badge {
  display: inline-block;
  background: #e8f1ff;
  color: #0077cc;
  border: 1px solid #c8dfff;
  border-radius: 20px;
  padding: 0.25rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.featured-img {
  width: 100%;
  max-width: 860px;
  margin: 1.25rem auto 0;
  border-radius: 12px;
  border: 1px solid #ddd;
  height: auto;
  display: block;
}

/* ---- BLOG ARTICLE CONTENT ---- */
.blog-container {
  padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.blog-post {
  max-width: 780px;
  margin-inline: auto;
}

.blog-post p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  overflow-wrap: break-word;
}

.blog-post h2 {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: #0a3d62;
  margin-top: 2.25rem;
  margin-bottom: 0.7rem;
  line-height: 1.3;
}

.blog-post h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: #0a3d62;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.blog-post h4 {
  font-size: 1.05rem;
  color: #0a3d62;
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-post ul,
.blog-post ol {
  margin-left: 1.4rem;
  margin-bottom: 1rem;
}

.blog-post li {
  margin: 0.4rem 0;
  line-height: 1.75;
  color: #333;
  overflow-wrap: break-word;
}

.blog-post hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

/* ---- TABLE ---- */
.blog-post table,
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.blog-post table th,
.blog-post table td,
table th,
table td {
  border: 1px solid #ddd;
  padding: 0.65rem 0.85rem;
  text-align: left;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.blog-post table thead,
table thead { background: #0a3d62; color: #fff; }

table tbody tr:nth-child(even) { background: #f8fbff; }

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 8px;
}

.table-responsive::-webkit-scrollbar { display: none; }

/* ---- BLOCKQUOTE ---- */
.blog-post blockquote,
blockquote {
  border-left: 4px solid #0a3d62;
  padding: 0.9rem 1.4rem;
  background: #eef3f7;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #333;
  line-height: 1.7;
}

/* ---- CODE ---- */
pre {
  background: #1e1e1e;
  color: #eaeaea;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin: 1rem 0;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

code { font-family: 'Courier New', Courier, monospace; }

/* ---- RELATED POSTS ---- */
/* ---- CTA CARD ---- */
.cta-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.cta-card h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: #0a3d62;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.cta-card p {
  color: #555;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.cta-card .btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 599px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-img { height: 170px; }
  table { font-size: 0.82rem; }
  table th, table td { padding: 0.5rem 0.6rem; }
}
