/* ==========================================================================
   Blog search (reused on blog-detail.php's sidebar)
   ========================================================================== */
.blog-search {
  display: flex;
  flex-shrink: 0;
  width: 360px;
  max-width: 100%;
}
.blog-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background-color: var(--white);
  font-family: var(--font-primary);
  font-size: 16px;
  color: #323232;
}
.blog-search__input::placeholder {
  color: #6b7280;
  opacity: 1;
}
.blog-search__btn {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 52px;
  border: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background-color: var(--theme);
  cursor: pointer;
  transition: var(--transition-base);
}
.blog-search__btn:hover {
  background-color: var(--secondary);
}

/* ==========================================================================
   Blog posts grid
   ========================================================================== */
.blog-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -20px -40px;
}
.blog-grid li {
  width: 33.33%;
  padding: 0 20px;
  margin-bottom: 40px;
  list-style: none;
}
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-card__photo {
  position: relative;
  overflow: hidden;
}
.blog-card__photo-bg {
  display: block;
  width: 100%;
  object-fit: cover;
}
.blog-card__photo-overlay {
  position: absolute;
  top: 61px;
  left: 75px;
  width: 345px;
  height: 196px;
  object-fit: contain;
  pointer-events: none;
}
.blog-card__content {
  position: relative;
  flex: 1;
  padding: 40px;
  background-color: #eff5fb;
  display: flex;
  flex-direction: column;
}
.blog-card .heading-20 {
  margin-bottom: 16px;
  font-weight: var(--fw-semibold);
}
.blog-card__excerpt p {
  margin-bottom: 24px;
  color: #505050;
}
.blog-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: var(--theme);
  transition: var(--transition-base);
}
.blog-card__link:hover {
  background-color: var(--secondary);
}
.blog-card__link img {
  transform: rotate(-45deg);
  filter: brightness(0) invert(1);
}
.blog-card__excerpt {
    flex: 1;
}

/* ==========================================================================
   Blog detail header (breadcrumb + article title, no hero image, no tabs)
   ========================================================================== */
.blog-detail-header {
  padding-top: 40px;
}
.blog-detail-header__crumbs {
  padding-bottom: 62px;
  border-bottom: 1px solid #e0e0e0;
}
.blog-detail-header__crumbs [class*="heading-"] {
  max-width: 1080px;
  margin: 0;
}
.blog-detail-header .woo_breadcums li,
.blog-detail-header .woo_breadcums li a,
.blog-detail-header .woo_breadcums .breadcrumb_last {
  color: var(--black);
}

/* ==========================================================================
   Blog detail body (article content + sidebar)
   ========================================================================== */
.blog-detail-layout {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}
.blog-detail-content {
  flex: 1;
  min-width: 0;
}
.blog-detail-content__hero {
  display: block;
  width: 100%;
  height: 628px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.blog-detail-content__intro {
  margin-top: 48px;
}
.blog-detail-content p {
  margin-bottom: 28px;
  color: #505050;
  font-size: 18px;
  line-height: 28px;
}
.blog-detail-content p:last-child {
  margin-bottom: 0;
}
.blog-detail-content__intro a,
.article-copy a {
  color: inherit;
  text-decoration: underline;
}

/* ==========================================================================
   Article sections (headings, copy, images, product spotlights)
   ========================================================================== */
.blog-detail-content .heading-34 {
  margin-top: 40px;
  margin-bottom: 20px;
}
.blog-detail-content .heading-30 {
  margin: 40px 0 24px;
}
.product-group > .heading-34:first-child {
  margin-top: 0;
}
.article-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 60px;
  border-radius: var(--radius-sm);
}
.article-divider {
  margin: 60px 0 0;
  border: 0;
  border-top: 1px solid #e0e0e0;
}

.spec-list {
  margin: 24px 0 0;
  padding: 0;
}
.blog-detail-content ul + *{
  margin-top: 30px;
}
.spec-list + .article-copy {
  margin-top: 24px;
}
.spec-list li {
  position: relative;
  margin-bottom: 16px;
  padding-left: 34px;
  list-style: none;
  color: #505050;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: var(--fw-medium);
  line-height: 24px;
}
.spec-list li:last-child {
  margin-bottom: 0;
}
.spec-list li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background: url('../images/icon-check-circle-theme.svg') no-repeat center / contain;
}

.product-spotlight {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-top: 40px;
}
.product-spotlight__text {
  flex: 1;
  min-width: 0;
}
.product-spotlight__media {
  flex-shrink: 0;
  width: 311px;
  background: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 35px 20px;
}
.product-spotlight__media img {
  border-radius: var(--radius-sm);
}
.product-spotlight__title {
  display: block;
  margin-bottom: 8px;
  color: var(--black);
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: var(--fw-extrabold);
  line-height: 28px;
}
.product-spotlight__title a {
  color: inherit;
  text-decoration: none;
}
.product-spotlight__title a:hover {
  color: var(--theme);
  text-decoration: underline;
}

.product-group {
  margin-top: 60px;
  padding: 60px 50px;
  background-color: #eff5fb;
}

.article-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 60px;
}
.article-pagination__prev,
.article-pagination__next {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--black);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.article-pagination__prev img {
  transform: rotate(180deg);
}

.blog-detail-sidebar {
  flex-shrink: 0;
  width: 460px;
}
.blog-detail-sidebar .blog-search {
  width: 100%;
  margin-bottom: 30px;
}
.recent-blogs {
  padding: 38px 50px 50px;
  background-color: #eff5fb;
}
.recent-blogs .heading-44 {
  margin: 0 0 38px;
}
.recent-blogs__list {
  margin: 0;
  padding: 0;
}
.recent-blogs__list li {
  list-style: none;
  margin-bottom: 0;
}
.recent-blogs__list li + li {
  margin-top: 38px;
  padding-top: 38px;
  border-top: 1px solid #e5e5e5;
}
.recent-blogs__list a {
  display: flex;
  align-items: center;
  gap: 28px;
  text-decoration: none;
}
.recent-blogs__list img {
  flex-shrink: 0;
  width: 104px;
  height: 77px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.recent-blogs__list span {
  color: var(--black);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: var(--fw-semibold);
  line-height: 21px;
  transition: var(--transition-base);
}
.recent-blogs__list a:hover span {
  color: var(--theme);
}

.sidebar-quote {
  margin-top: 60px;
  padding: 46px 50px 52px;
  background-color: #011b36;
}
.sidebar-quote .heading-36 {
  margin: 0 0 28px;
  color: var(--white);
}
.sidebar-quote__form select.form-control {
  appearance: none;
  background-image: url('../images/icon-select-chevron.svg');
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px;
  color: #323232;
}

/* ==========================================================================
   Dynamic markup: card links, empty list, content typed in the editor, blocks
   ========================================================================== */
.blog-card__photo {
  display: block;
}
.blog-card__photo-bg {
  height: auto;
  aspect-ratio: 480 / 300;
}
.blog-posts__empty {
  color: #505050;
  font-size: 18px;
  line-height: 28px;
}

.blog-detail-content__hero + .blog-detail-content__body {
  margin-top: 48px;
}
.blog-detail-content__body :where(p, li, td, th) a {
  color: inherit;
  text-decoration: underline;
}
.blog-detail-content__body > :first-child {
  margin-top: 0;
}
.blog-detail-content__body h2,
.blog-detail-content__body h3,
.blog-detail-content__body h4 {
  margin: 40px 0 20px;
  color: var(--black);
  font-weight: var(--fw-extrabold);
  line-height: 1.19;
}
/* The design sizes every article heading as .heading-34 */
.blog-detail-content__body h2,
.blog-detail-content__body h3 {
  font-size: clamp(1.667rem, 1.557rem + 0.475vw, 2.125rem);
}
.blog-detail-content__body h4 {
  margin-bottom: 8px;
  font-family: var(--font-primary);
  font-size: 20px;
  line-height: 28px;
}
.blog-detail-content__body h4 a {
  color: inherit;
  text-decoration: none;
}
.blog-detail-content__body h4 a:hover {
  color: var(--theme);
  text-decoration: underline;
}
.blog-detail-content__body ul {
  margin: 24px 0 0;
  padding: 0;
}
.blog-detail-content__body ul li {
  position: relative;
  margin-bottom: 16px;
  padding-left: 34px;
  list-style: none;
  color: #505050;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: var(--fw-medium);
  line-height: 24px;
}
.blog-detail-content__body ul li:last-child {
  margin-bottom: 0;
}
.blog-detail-content__body ul li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background: url('../images/icon-check-circle-theme.svg') no-repeat center / contain;
}
.blog-detail-content__body ol {
  margin: 24px 0 0;
  padding-left: 24px;
}
.blog-detail-content__body ol li {
  margin-bottom: 16px;
  color: #505050;
  font-size: 18px;
  line-height: 24px;
}
.blog-detail-content__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.blog-detail-content__body > img,
.blog-detail-content__body > p > img:only-child,
.blog-detail-content__body .wp-block-image {
  display: block;
  margin: 60px 0 0;
}
.blog-detail-content__body table {
  width: 100%;
  margin: 24px 0 28px;
  border-collapse: collapse;
}
.blog-detail-content__body th,
.blog-detail-content__body td {
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  color: #505050;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  vertical-align: top;
}
.blog-detail-content__body th {
  color: var(--black);
  font-weight: var(--fw-semibold);
}
.blog-detail-content__body hr,
.blog-detail-content__body .wp-block-separator {
  width: 100%;
  max-width: none;
  margin: 60px 0 0;
  border: 0;
  border-top: 1px solid #e0e0e0;
  opacity: 1;
}

/* Image Content block (.product-spotlight) and Light Blue Section block (.product-group) */
/* ACF wraps the section's inner blocks in .acf-innerblocks-container on the front end */
.product-spotlight__text > :last-child,
.product-group .acf-innerblocks-container > :last-child {
  margin-bottom: 0;
}
.product-group .acf-innerblocks-container > :first-child {
  margin-top: 0;
}

.article-pagination__next {
  margin-left: auto;
}

/* The quote form in the sidebar: one field per row */
.sidebar-quote .form-group.form-group50 {
  width: 100%;
}
.sidebar-quote .wpcf7-form-control-wrap {
  display: block;
}
.sidebar-quote .wpcf7-not-valid-tip {
  margin-top: 4px;
  font-size: 14px;
}
.sidebar-quote .wpcf7-response-output {
  margin: 16px 0 0;
  color: var(--white);
  font-size: 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
 

@media (max-width: 1439.98px){
  .blog-grid{
    margin: 0 -10px -20px;
  }
  .blog-grid li{
    padding: 0 10px;
    margin-bottom: 20px;
  }
  .blog-card__content{
    padding: 30px;
  }
  .blog-card .heading-20{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
}

@media (max-width: 1366px){
  .recent-blogs{padding: 25px;}
  .recent-blogs .heading-44{margin: 0 0 22px;}
  .recent-blogs__list li + li{margin-top: 20px;padding-top: 20px;}
  .sidebar-quote{margin-top: 30px;padding: 25px;}
  .blog-detail-sidebar{width: 350px;}
  .recent-blogs__list a{gap:10px;}
  .recent-blogs__list img{width: 60px;height: 55px;}
  .product-spotlight__media{padding: 20px;width: 270px;}
  .product-spotlight{gap: 15px;}
  .product-group{margin-top: 40px;padding: 30px;}
  .article-divider{margin: 30px 0 0;}
}

@media (max-width: 1199.98px){
  .blog-detail-header__crumbs{
    padding-bottom: 30px;
  }
  .article-pagination{
    margin-top: 30px;
  }
  .filter-tabs {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-bottom: 15px;
  }
  .filter-tabs li{
       white-space: nowrap;
  }
  .product-spotlight{
    flex-wrap: wrap;
    margin-top: 20px;
  }
  .product-spotlight__media{width: 100%;border: 1px solid var(--border-light);margin: 20px 0;}
  .blog-detail-content .heading-34{
      margin-top: 30px;
      margin-bottom: 15px;
  }
}

@media (max-width: 991.98px){
  .blog-grid {margin: 0 -5px -10px;}
  .blog-grid li{
    padding: 0 5px;
        margin-bottom: 10px;
        width: 50%;
  }
  .blog-card__content{
    padding: 20px;
  }

  .blog-card__excerpt p{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .blog-detail-layout{
    flex-wrap: wrap;
    gap: 40px;
  }
  .blog-detail-sidebar{
    width: 100%;
  }

}


@media (max-width: 450px){
  .blog-grid li{width: 100%;}
}