/* ================================================= */
/* Knowledge Hub (page ID 19): Query Loop layout     */
/* ================================================= */

/* Force 2 columns on desktop */
body.page-id-19 .wp-block-query .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 32px !important;
}

/* Prevent Astra / flex rules forcing widths */
body.page-id-19 .wp-block-query .wp-block-post-template > li {
  width: auto !important;
  max-width: none !important;
}

/* Mobile: switch to 1 column */
@media (max-width: 780px) {
  body.page-id-19 .wp-block-query .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }
}

/* Hide post date in Knowledge Hub cards */
body.page-id-19 time.wp-block-post-date,
body.page-id-19 .wp-block-post-date {
  display: none !important;
}


/* ================================================= */
/* Blog posts: hide date / meta row                  */
/* ================================================= */

.single-post .entry-meta,
.single-post .posted-on,
.single-post .entry-meta .posted-on,
.single-post .ast-meta,
.single-post .ast-single-post-meta {
  display: none !important;
}


/* ================================================= */
/* Responsive inline padding override                */
/* ================================================= */

/* Tablet */
@media (max-width: 921px) {
  [style*="padding-left"] {
    padding-left: 18px !important;
  }

  [style*="padding-right"] {
    padding-right: 18px !important;
  }
}

/* Mobile */
@media (max-width: 544px) {
  [style*="padding-left"] {
    padding-left: 14px !important;
  }

  [style*="padding-right"] {
    padding-right: 14px !important;
  }
}


/* ================================================= */
/* Fix extra left inset in first column on Home + About */
/* ================================================= */

@media (max-width: 921px) {

  body.home .wp-block-column:first-child,
  body.page-id-1 .wp-block-column:first-child {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  body.home .wp-block-column:first-child p,
  body.home .wp-block-column:first-child h1,
  body.home .wp-block-column:first-child h2,
  body.page-id-1 .wp-block-column:first-child p,
  body.page-id-1 .wp-block-column:first-child h1,
  body.page-id-1 .wp-block-column:first-child h2 {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

}


/* ================================================= */
/* About page: Media & Text intro                    */
/* ================================================= */

/* Desktop */
body.page-id-1 .wp-block-media-text {
  align-items: flex-start !important;
  grid-template-columns: 1fr 220px !important;
}

body.page-id-1 .wp-block-media-text__content {
  padding: 0 40px 0 0 !important;
}

body.page-id-1 .wp-block-media-text__media {
  margin: 0 !important;
  align-self: flex-start !important;
}

body.page-id-1 .wp-block-media-text__media img {
  width: 180px !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin-left: auto !important;
}


/* Tablet */
@media (max-width: 921px) and (min-width: 545px) {

  body.page-id-1 .wp-block-media-text {
    grid-template-columns: 1fr 170px !important;
  }

  body.page-id-1 .wp-block-media-text__content {
    padding: 0 20px 0 0 !important;
  }

  body.page-id-1 .wp-block-media-text__media img {
    width: 150px !important;
  }

}


/* Mobile */
@media (max-width: 544px) {

  body.page-id-1 .wp-block-media-text {
    grid-template-columns: 1fr !important;
  }

  body.page-id-1 .wp-block-media-text__content {
    padding: 0 !important;
  }

  body.page-id-1 .wp-block-media-text__media {
    margin-top: 20px !important;
  }

  body.page-id-1 .wp-block-media-text__media img {
    width: 140px !important;
    margin: 0 auto 43px auto !important;
    display: block !important;
  }

}


/* ================================================= */
/* About page certificate logos (mobile only)        */
/* ================================================= */

@media (max-width: 544px) {

  body.page-id-1 .wp-block-image img {
    max-width: 60px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

}


/* ================================================= */
/* Blog archive cards (preview cards only)           */
/* ================================================= */

body.category-blog .ast-row > article,
body.archive .ast-row > article,
body.blog:not(.single-post) .ast-row > article {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.category-blog article,
body.archive article,
body.blog:not(.single-post) article {
  background-color: #f3f7f5 !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.category-blog .ast-article-post,
body.archive .ast-article-post,
body.blog:not(.single-post) .ast-article-post,
body.category-blog .post-content,
body.archive .post-content,
body.blog:not(.single-post) .post-content,
body.category-blog .entry-header,
body.archive .entry-header,
body.blog:not(.single-post) .entry-header,
body.category-blog .entry-content,
body.archive .entry-content,
body.blog:not(.single-post) .entry-content {
  background-color: #f3f7f5 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.category-blog article .entry-header,
body.category-blog article .entry-content,
body.archive article .entry-header,
body.archive article .entry-content,
body.blog:not(.single-post) article .entry-header,
body.blog:not(.single-post) article .entry-content {
  padding-left: 24px !important;
  padding-right: 24px !important;
}


/* ================================================= */
/* Single blog posts: force white background         */
/* ================================================= */

body.single-post article,
body.single-post .ast-article-post,
body.single-post .post-content,
body.single-post .entry-header,
body.single-post .entry-content,
body.single-post .post-thumb {
  background-color: #ffffff !important;
}


/* ================================================= */
/* Footer background                                 */
/* ================================================= */

.site-footer,
.site-primary-footer-wrap,
.ast-builder-footer-grid-columns,
.ast-builder-footer-grid-columns * {
  background-color: #f3f7f5 !important;
}


/* ================================================= */
/* Banner images                                     */
/* ================================================= */

body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__image-background,
body.home .entry-content > .wp-block-cover:first-of-type img,
body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__image-background,
body.page .entry-content > .wp-block-cover:first-of-type img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}


/* ================================================= */
/* Desktop + tablet banners = 150px                  */
/* ================================================= */

body.home .entry-content > .wp-block-cover:first-of-type,
body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container,
body.page .entry-content > .wp-block-cover:first-of-type,
body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container {
  height: 150px !important;
  min-height: 150px !important;
  max-height: 150px !important;
}

body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container,
body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 20px !important;
}

body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container > *,
body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container > * {
  margin: 0 !important;
  text-align: center !important;
  max-width: 100% !important;
  line-height: 1.15 !important;
}


/* ================================================= */
/* Mobile banners = 110px                            */
/* ================================================= */

@media (max-width: 768px) {

  body.home .entry-content > .wp-block-cover:first-of-type,
  body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container,
  body.page .entry-content > .wp-block-cover:first-of-type,
  body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container {
    height: 110px !important;
    min-height: 110px !important;
    max-height: 110px !important;
  }

  body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container,
  body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container {
    padding: 0 16px !important;
  }

  body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container,
  body.home .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container *,
  body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container,
  body.page .entry-content > .wp-block-cover:first-of-type .wp-block-cover__inner-container * {
    font-size: 20px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

}


/* ================================================= */
/* Blog archive: force 2 columns on tablet           */
/* ================================================= */

@media (max-width: 921px) and (min-width: 545px) {

  body.category-blog .ast-row,
  body.archive .ast-row,
  body.blog:not(.single-post) .ast-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 32px !important;
  }

  body.category-blog .ast-row > article,
  body.archive .ast-row > article,
  body.blog:not(.single-post) .ast-row > article {
    width: auto !important;
    max-width: none !important;
  }

}


/* ================================================= */
/* Homepage latest blog posts                        */
/* ================================================= */

.home .wp-block-query .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 32px !important;
  list-style: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  max-width: 1100px !important;
}

.home .wp-block-query .wp-block-post-template > li {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

/* Mobile: stack to one column */
@media (max-width: 768px) {
  .home .wp-block-query .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }
}


/* ================================================= */
/* Infinite scroll elements                          */
/* ================================================= */

.infinite-loader,
#infinite-handle,
#infinite-footer,
.infinite-scroll .posts-navigation,
.infinity-end.never-reached {
  display: none !important;
}


/* ================================================= */
/* Mobile anchor font size                           */
/* ================================================= */

@media (max-width: 767px) {
  a[href^="#"] {
    font-size: 16px;
  }
}


/* ================================================= */
/* Marketing services intro + testimonial            */
/* ================================================= */

.services-intro-layout {
  display: flex;
  gap: 40px;
  margin: 24px 0 32px;
  align-items: flex-start;
}

.services-summary {
  background-color: #F3F7F5;
  padding: 40px;
  flex: 0 0 45%;
  box-sizing: border-box;
}

.services-summary-title {
  margin: 0 0 16px;
  font-weight: 600;
}

.services-summary p {
  margin: 0 0 12px;
}

.services-summary p:last-child {
  margin-bottom: 0;
}

.services-summary a {
  text-decoration: underline;
}

.testimonial-highlight {
  flex: 1;
  box-sizing: border-box;
}

.testimonial-quote {
  margin: 0 0 8px;
  font-family: 'Merriweather', serif;
  font-size: 28px;
  line-height: 1.4;
  color: #2f6f64;
}

.testimonial-source {
  margin: 0;
}

.testimonial-source a {
  text-decoration: none;
  color: inherit;
}

.testimonial-source a:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .services-intro-layout {
    gap: 24px;
  }

  .services-summary {
    padding: 24px;
    flex: 0 0 48%;
  }

  .testimonial-quote {
    margin-bottom: 6px;
  }
}

@media (max-width: 767px) {
  .services-intro-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .services-summary {
    width: 100%;
    padding: 18px;
  }

  .services-summary a {
    font-size: 14px;
  }

  .testimonial-highlight {
    width: 100%;
    padding-left: 18px;
    padding-right: 18px;
    box-sizing: border-box;
  }

  .testimonial-quote {
    font-size: 1rem;
    margin: 0 0 12px;
  }
}

@media (min-width: 1025px) {
  .testimonial-quote {
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .testimonial-source {
    font-size: 18px;
  }
}
.testimonial-quote {
  margin: 0 0 4px;
}

.testimonial-source {
  margin: 0;
}
.testimonial-highlight p {
  margin: 0 !important;
}

.testimonial-quote {
  margin-bottom: 4px !important;
}