/* ===== FONT IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Lora:wght@400;500;700&display=swap');

/* ========================================================= */
/* === GLOBAL STYLES === */
/* ========================================================= */

/* Hide tags inside blog posts only, keep tags visible in listings */
.blog-post .blog-post__tags,
.blog-post .blog-post__tag-link,
.blog-post .banner-tags,
.blog-post .blog-tags,
.blog-post .post-footer__tags,
.blog-post .tag,
.blog-post a[href*="/tag/"]:not(.related-post-tag),
.blog-post [rel="tag"]:not(.related-post-tag) {
  display: none !important;
}

/* Blog post main headings */
.blog-post h1 {
  margin-left: 10%;
}

/* Typography */
h6 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #000;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 2rem 0 0.5rem;
  line-height: 1.3;
}

/* Blockquote */
.hs_cos_wrapper_type_rich_text blockquote {
  border-left: 4px solid #FFC712;
  background-color: #f8fafc;
  padding: 2.5rem;
  margin: 2.5rem 0;
  position: relative;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: #1e293b;
  font-size: 1.5rem;
  line-height: 1.6;
  border-radius: 0 8px 8px 0;
}
.hs_cos_wrapper_type_rich_text blockquote p {
  margin: 0 0 1.25rem;
  padding-left: 2rem;
}
.hs_cos_wrapper_type_rich_text blockquote::before {
  content: "\201C";
  font-size: 5rem;
  color: #000;
  position: absolute;
  top: -1rem;
  left: 1.5rem;
}
.hs_cos_wrapper_type_rich_text blockquote cite {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: #000;
}
.hs_cos_wrapper_type_rich_text blockquote .highlight {
  background-color: #FFC712;
  padding: 0 2px;
}

/* Highlights */
.blog-post__body mark,
.blog-post mark,
.hs-blog-post mark {
  background-image: linear-gradient(#FFC712 0%, #FFC712 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.5em;
  background-position: 0 95%;
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* CTA Links */
a.custom-link_simonCTA {
  border-left: 4px solid #FFC712 !important;
  background-color: #f8fafc !important;
  padding: 1.5rem 2rem !important;
  font-family: 'DM Sans', sans-serif !important;
  color: #1e293b !important;
}

/* Hide author, meta, comments */
#hs_cos_wrapper_post_author,
#hs_cos_wrapper_post_date,
.blog-post__meta,
.blog-comments {
  display: none !important;
}

/* ========================================================= */
/* === POST CARD / LISTING SHARED SYSTEM === */
/* ========================================================= */

.post-card,
.blog-index__post {
  position: relative;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  display: flex;
  flex-direction: column;
}
.post-card:hover,
.blog-index__post:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}
.post-link,
.blog-index__post a {
  text-decoration: none;
  color: inherit;
}

/* Images */
.blog-index__post-image-wrapper {
  position: relative;
  display: block;
  line-height: 0;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}
.blog-index__post-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
  pointer-events: none;
}
.blog-index__post:hover .blog-index__post-thumb {
  transform: scale(1.05);
}

/* Image overlay (dims by default, disappears on hover) */
.blog-index__post-image-wrapper::before {
  content: "";
  display: block !important;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none; /* keeps image clickable */
}
.blog-index__post:hover .blog-index__post-image-wrapper::before {
  opacity: 0;
}

/* ========================================================= */
/* === UNIFIED TAG PILL SYSTEM === */
/* ========================================================= */

.blog-index__post-tags,
.related-post-tags {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  z-index: 5;
}

.tag-pill,
.blog-index__post-tag,
.related-post-tag {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  text-transform: lowercase !important;
  padding: 6px 11px !important;
  line-height: 1.6 !important;
  border-radius: 0 !important;
  background-color: #FFC712 !important;
  color: #000 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.tag-pill:hover,
.blog-index__post-tag:hover,
.related-post-tag:hover {
  background-color: #000 !important;
  color: #FFC712 !important;
}
.tag-pill.active,
.blog-index__post-tag.active,
.related-post-tag.active {
  background-color: #000 !important;
  color: #FFC712 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

/* ========================================================= */
/* === TEXT CONTENT === */
/* ========================================================= */

.blog-index__post-content {
  padding: 25px;
}
.blog-index__post-title {
  margin: 0 0 12px;
  color: #222;
  font-size: 1.3rem;
  font-weight: 500;
  font-family: 'Lora', serif;
  line-height: 1.4;
  transition: color 0.3s;
}
.blog-index__post:hover .blog-index__post-title {
  color: #000;
}
.blog-index__post-title a {
  text-decoration: none;
  color: inherit;
}

/* Excerpt Reveal */
.blog-index__post-summary,
.blog-index__post-excerpt {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .4s cubic-bezier(.25,.46,.45,.94), opacity .25s ease;
}
.blog-index__post:hover .blog-index__post-summary,
.blog-index__post:hover .blog-index__post-excerpt {
  max-height: 90px;
  opacity: 1;
}
.blog-index__post-summary p,
.blog-index__post-excerpt p {
  margin: 0;
  color: #666;
  font-size: 0.85rem;
  line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
}

/* Read More */
.read-more {
  margin-top: 15px;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}
.read-more a {
  text-decoration: none;
  color: #FFC712;
  display: flex;
  align-items: center;
  gap: 5px;
}
.read-more a:hover { color: #000; }
.read-more svg path { stroke: currentColor; }

/* ========================================================= */
/* === CASE STUDIES LISTING BANNER === */
/* ========================================================= */

.case-studies-banner {
  position: relative;
  width: 100%;
  height: 60vh;
  max-height: 600px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 0 10%;
}
.case-studies-heading {
  font-family: 'Lora', serif;
  font-size: 82px;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 22px 0;
  color: white;
}
.case-studies-strapline {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
  color: white;
}

/* ========================================================= */
/* === LISTING GRID (2 COLUMNS FIXED) === */
/* ========================================================= */

.blog-index {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 10px;
}
@media (max-width: 900px) {
  .blog-index {
    grid-template-columns: 1fr !important;
    gap: 25px;
  }
  .blog-index__post-content { padding: 20px !important; }
  .blog-index__post-title { font-size: 1.15rem !important; }
}

/* ========================================================= */
/* === TAG PILLS (GLOBAL FILTER) === */
/* ========================================================= */

.tag-pills-wrapper {
  display: flex;
  justify-content: center;
  margin: 50px 0 0;
  width: 100%;
}
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
}

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

.body-container--blog-index .pagination {
  margin: 20px 0 50px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.body-container--blog-index .pagination ul {
  list-style: none;
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0;
}

/* Base buttons */
.body-container--blog-index .pagination a,
.body-container--blog-index .pagination span {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 0;
  border: none;
  outline: none;
  transition: all 0.3s ease;
}

/* Inactive buttons */
.body-container--blog-index .pagination a {
  background: #FFC712;
  color: #000;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.body-container--blog-index .pagination a:hover {
  background: #000;
  color: #FFC712;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Active page */
.body-container--blog-index .pagination li.active > span,
.body-container--blog-index .pagination a.active-fix {
  background: #000 !important;
  color: #FFC712 !important;
  cursor: default !important;
  pointer-events: none !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

/* Prev/Next wider — both <a> and <span> */
.body-container--blog-index .pagination a.prev,
.body-container--blog-index .pagination a.next,
.body-container--blog-index .pagination span.prev,
.body-container--blog-index .pagination span.next {
  min-width: 70px;
  padding: 0 12px;
}

/* Disabled Prev/Next */
.body-container--blog-index .pagination span.prev,
.body-container--blog-index .pagination span.next {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================================= */
/* === RELATED POSTS MODULE === */
/* ========================================================= */

.related-posts {
  width: 100vw;
  max-width: 1600px;
  margin: 0 auto 30px;
  padding: 0 40px;
}
.related-posts__divider {
  height: 3px;
  background-color: #FFC712;
}
.related-posts__header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 21.6px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #333;
}
.related-posts__header h2 span {
  background-image: linear-gradient(#FFC712 0%, #FFC712 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.5em;
  background-position: 0 95%;
  padding: 0 2px 0 0;
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.related-post-card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  display: flex;
  flex-direction: column;
}
.related-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}
.related-post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.related-post-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.related-post-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transform: scale(1);
  transition: transform 0.6s ease;
  filter: none !important;
}
/* Related post image overlay (dims by default, disappears on hover) */
.related-post-image-wrapper::before {
  content: "";
  display: block !important;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none; /* keeps image clickable */
}
.related-post-card:hover .related-post-image-wrapper::before {
  opacity: 0;
}
.related-post-card:hover .related-post-image {
  transform: scale(1.05);
  filter: none !important;
}
.related-post-text {
  padding: 25px;
  flex-grow: 1;
}
.related-post-title {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 500;
  font-family: 'Lora', serif;
  line-height: 1.4;
  color: #222;
}
.related-post-excerpt {
  margin: 0;
  color: #666;
  font-size: 0.85rem;
  line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
  max-height: 90px;
  overflow: hidden;
}
.related-read-more {
  margin-top: 15px;
  color: #FFC712;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}
.related-read-more:hover {
  color: #000;
}
.related-read-more svg path {
  stroke: currentColor;
}
@media (max-width: 1100px) {
  .related-posts__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .related-posts__grid { grid-template-columns: 1fr; }
}
.related-posts .related-post-tags,
.related-posts .related-post-tag {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.related-post-image-wrapper img.related-post-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
/* Related Posts restyle */
.related-posts {
  width: 100vw;
  max-width: 1600px;
  margin: 30px auto 0; /* smaller top margin than before */
  padding: 40px;
  background-color: #f8f9fa; /* subtle grey background */
}

/* Remove the yellow divider line */
.related-posts__divider {
  display: none;
}

/* Adjust heading spacing */
.related-posts__header {
  margin-top: 0; /* eliminate extra space */
  margin-bottom: 25px; /* tighter than before */
}
.related-posts__header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 21.6px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #333;
}
/* Pull Related Posts closer to the content */
.related-posts {
  margin-top: -10px; /* much smaller gap */
  margin-bottom: 0;
  background-color: #f8f9fa;
  padding: 40px;
}

/* ========================================================= */
/* === BLOG HEADER CONSISTENT TITLE POSITION === */
/* ========================================================= */

.blog-header {
  position: relative !important;
  width: 100vw !important;
  left: calc(-50vw +
/* ========================================================= */
/* === BLOG CONTENT + RELATED POSTS SPACING FIX === */
/* ========================================================= */

/* Remove extra bottom margin under blog content */
.blog-post__body,
.hs_cos_wrapper_type_rich_text,
.blog-post {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Related Posts closer to content */
.related-posts {
  margin-top: 0px !important; /* adjust up/down until happy */
  background-color: #f8f9fa;
  padding: 40px;
}
.blog-post__body > *:last-child,
.hs_cos_wrapper_type_rich_text > *:last-child {
  margin-bottom: 0 !important;
}