/**
 * Blog-specific styles
 * Uses only where existing site CSS does not cover blog post layout.
 * Does not override or duplicate main.css.
 */

/* Blog post meta (date, author, category) */
.blog-post-meta {
  font-size: 14px;
  color: #676a73;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4e6ea;
}

.blog-post-meta span {
  margin-right: 16px;
}

.blog-post-meta span:last-child {
  margin-right: 0;
}

/* Blog post featured image */
.blog-post-featured {
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 4px;
}

.blog-post-featured img {
  width: 100%;
  height: auto;
  display: block;
}

/* Blog post body / prose */
.blog-post-body {
  font-size: 16px;
  line-height: 1.7;
  color: #32333a;
}

.blog-post-body p {
  margin: 0 0 16px;
}

.blog-post-body h2,
.blog-post-body h3 {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #32333a;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

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

/* In-post images: flow within content column, not full page width */
.blog-post-body img,
.blog-post-body figure img {
  max-width: 100%;
  height: auto;
  display: block;
}

.blog-post-body figure {
  margin: 20px 0;
}

/* Breadcrumbs in main content column */
.blog-breadcrumbs {
  font-size: 14px;
  color: #676a73;
  margin-bottom: 16px;
}

.blog-breadcrumbs a {
  color: #515465;
  text-decoration: none;
}

.blog-breadcrumbs a:hover {
  color: #d23540;
}

.blog-breadcrumbs span {
  margin: 0 6px;
  color: #999;
}

/* Prev/Next post navigation */
.blog-post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e4e6ea;
}

.blog-post-nav a {
  color: #d23540;
  font-weight: 600;
  text-decoration: none;
}

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

.blog-post-nav .blog-prev {
  text-align: left;
}

.blog-post-nav .blog-next {
  text-align: right;
}

/* Blog layout: two-column (main col-lg-8 + sidebar col-lg-4), stack at lg breakpoint */
.section-articles .blog-layout.two-cols {
  display: flex;
  flex-wrap: wrap;
}

.blog-layout .blog-main {
  width: 66.666667%; /* col-lg-8 equivalent */
  padding-right: 24px;
}

.blog-layout .blog-sidebar {
  width: 33.333333%; /* col-lg-4 equivalent */
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .blog-layout .blog-main,
  .blog-layout .blog-sidebar {
    width: 100%;
    padding-right: 0;
  }

  .blog-layout .blog-sidebar {
    margin-top: 32px;
  }
}

/* Single post: override main.css article-post side-by-side layout */
/* Force stacked layout: featured image full-width on top, then meta, then body */
.section-articles .blog-main .article-post {
  flex-direction: column;
  align-items: stretch;
}

.section-articles .blog-main .article-post .blog-post-featured.image-holder {
  width: 100%;
  margin: 0 0 24px;
  order: 1;
}

.section-articles .blog-main .article-post .blog-post-meta {
  order: 2;
}

.section-articles .blog-main .article-post .blog-post-body.textbox {
  width: 100%;
  order: 3;
}

.section-articles .blog-main .article-post .blog-post-featured img {
  width: 100%;
  height: auto;
  display: block;
}

/* Blog sidebar – container */
.blog-sidebar {
  padding-left: 24px;
  align-self: flex-start;
}

.blog-sidebar-inner {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 100px;
}

@media (max-width: 991px) {
  .blog-sidebar {
    padding-left: 0;
    padding-top: 32px;
  }

  .blog-sidebar-inner {
    position: static;
  }
}

/* Widget titles */
.blog-sidebar h3,
.blog-sidebar h4 {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #333;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #d23540;
}

.blog-sidebar h4:not(:first-child) {
  margin-top: 28px;
}

/* Recent posts list */
.blog-sidebar-recent {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.blog-sidebar-recent li {
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
}

.blog-sidebar-recent li:last-child {
  border-bottom: none;
}

.blog-sidebar-recent li a {
  color: #444;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.blog-sidebar-recent li a:hover {
  color: #d23540;
  padding-left: 5px;
}

.blog-sidebar-date {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* Categories as tags/badges */
.blog-sidebar-categories {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.blog-sidebar-categories li {
  display: inline-block;
  margin: 4px;
  padding: 0;
  border: none;
}

.blog-sidebar-categories li a {
  display: inline-block;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.blog-sidebar-categories li a:hover {
  background: #d23540;
  color: #fff;
  border-color: #d23540;
}

/* CTA box */
.blog-sidebar-cta {
  margin-top: 30px;
  background: #d23540;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
}

.blog-sidebar-cta .blog-sidebar-cta-title {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 8px;
  font-family: "Montserrat", Arial, sans-serif;
}

.blog-sidebar-cta .blog-sidebar-cta-sub {
  color: #fff;
  font-size: 14px;
  margin: 0 0 16px;
  opacity: 0.95;
}

.blog-sidebar-cta .btn {
  color: #d23540;
  background: #fff;
  padding: 11px 23px;
  font-weight: 700;
  border-radius: 35px;
  border: 2px solid #fff;
  text-decoration: none;
  display: inline-block;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.blog-sidebar-cta .btn:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

/* Blog index / listing grid */
.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 24px;
}

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

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

.blog-post-card {
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e4e6ea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

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

.blog-post-card .card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f2;
}

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

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

/* Order: title first, then meta, excerpt, read-more */
.blog-post-card .card-title {
  order: 1;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 10px;
}

.blog-post-card .card-meta {
  order: 2;
  font-size: 13px;
  color: #676a73;
  margin-bottom: 10px;
}

.blog-post-card .card-meta span {
  margin-right: 12px;
}

.blog-post-card .card-excerpt {
  order: 3;
}

.blog-post-card .card-read-more {
  order: 4;
}

.blog-post-card .card-title a {
  color: #32333a;
  text-decoration: none;
}

.blog-post-card .card-title a:hover {
  color: #d23540;
}

.blog-post-card .card-excerpt {
  font-size: 14px;
  color: #515465;
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
}

.blog-post-card .card-read-more {
  font-weight: 600;
  color: #d23540;
  text-decoration: none;
  font-size: 14px;
}

.blog-post-card .card-read-more:hover {
  text-decoration: underline;
}

/* Pagination */
.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e4e6ea;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  color: #515465;
  background: #f6f6f7;
  border: 1px solid #e4e6ea;
}

.blog-pagination a:hover {
  background: #fff;
  color: #d23540;
  border-color: #d23540;
}

.blog-pagination .current {
  background: #d23540;
  color: #fff;
  border-color: #d23540;
}

.blog-pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}
