/* ===========================================
   Blog — conventional white-panel layout
   =========================================== */

/* Full-width white page body */
.blog-index,
.blog-post {
  background: #ffffff;
  min-height: 60vh;
  margin-top: 5rem;
  border-radius: 0.25rem;
}

/* Centred reading column */
.blog-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  color: #2c3340;
}

/* Wide shell for category grid */
.blog-shell--wide {
  max-width: 1100px;
}

/* ---- Index / archive heading ---- */
.blog-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0d437e;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #d2232a;
  line-height: 1.2;
}

/* ---- Archive description ---- */
.blog-meta {
  margin: -0.75rem 0 1.25rem;
  color: #6c757d;
  font-size: 0.875rem;
}

/* ---- Post list ---- */
.blog-list {
  display: grid;
  gap: 0;
}

.blog-card {
  padding: 1.4rem 0;
  border-bottom: 1px solid #e2e6ea;
}

.blog-card:first-child {
  border-top: 1px solid #e2e6ea;
}

/* ---- Category card grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media only screen and (min-width: 540px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (min-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-grid .blog-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid #e2e6ea;
  border-top: 1px solid #e2e6ea;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s;
}

.blog-grid .blog-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.blog-grid .blog-card-thumbnail {
  margin-bottom: 0;
  display: block;
  line-height: 0;
}

.blog-grid .blog-card-img {
  height: 200px;
  border-radius: 0;
}

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

.blog-card-body .blog-link-wrap {
  margin-top: auto;
  padding-top: 0.75rem;
}

.blog-card-thumbnail {
  display: block;
  margin-bottom: 0.75rem;
  line-height: 0;
}

.blog-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0.25rem;
}

/* ---- Single post featured image ---- */
.blog-featured-image {
  line-height: 0;
  margin: 0 0 1rem;
}

.blog-featured-img {
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
  display: block;
}

/* Float right at ≥600px */
@media only screen and (min-width: 600px) {
  .blog-featured-image {
    float: right;
    width: 50%;
    margin: 0.25rem 0 1.25rem 1.75rem;
  }

  /* clearfix so the article doesn't collapse around the float */
  .blog-content::after {
    content: "";
    display: block;
    clear: both;
  }
}

.blog-card-title {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}

.blog-card-title a {
  color: #0d437e;
  text-decoration: none;
}

.blog-card-title a:hover,
.blog-card-title a:focus {
  color: #d2232a;
  text-decoration: underline;
}

.blog-card .blog-meta {
  margin: 0 0 0.55rem;
}

.blog-excerpt {
  color: #2c3340;
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.blog-link-wrap {
  margin: 0;
}

/* ---- Pagination ---- */
.blog-pagination {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e6ea;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.blog-pagination a {
  color: #0d437e;
  font-weight: 600;
  text-decoration: none;
}

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

/* ---- Single post heading ---- */
.blog-post .blog-title {
  font-size: 1.8rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.25rem;
}

.blog-post .blog-meta {
  margin: 0 0 1.25rem;
}

/* ---- Post body ---- */
.blog-content {
  color: #2c3340;
  line-height: 1.75;
  font-size: 1.05rem;
  border-top: 1px solid #e2e6ea;
  padding-top: 1.25rem;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: #0d437e;
  margin-top: 1.5em;
  margin-bottom: 0.4em;
}

.blog-content p {
  margin: 0 0 1.1rem;
}

.blog-content a {
  color: #0d437e;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}

/* ---- CTA block ---- */
.blog-cta {
  margin-top: 2rem;
  padding: 1.25rem;
  background: #f4f7fb;
  border-left: 5px solid #d2232a;
  border-radius: 0.25rem;
}

.blog-cta-title {
  margin: 0 0 0.4rem;
  color: #0d437e;
  font-size: 1.2rem;
  font-weight: 700;
}

.blog-cta-copy {
  margin: 0 0 0.85rem;
  color: #2c3340;
}

.blog-cta-link-wrap {
  margin: 0;
}

/* ---- Desktop: clear fixed 104px header ---- */
@media only screen and (min-width: 740px) {
  .blog-index,
  .blog-post {
    margin-top: 7.5rem;
  }
}

@media only screen and (min-width: 1080px) {
  main {
    padding-top: .00125rem;
  }
  .blog-index,
  .blog-post {
    margin-top: 8.5rem;
  }

  .blog-post .blog-title {
    font-size: 2.25rem;
  }
}
