/* Blog post */

.blog-post {
    margin: 0 auto;
    /* max-width: 960px; */
    padding: 80px 20px !important;
}

.blog-post__meta {
  margin-bottom: 1.4rem;
}

.blog-post__meta a {
  text-decoration: underline;
}

.blog-post__timestamp {
  display: block;
}

.blog-post__tags svg {
  height: auto;
  margin-right: 0.35rem;
  width: 15px;
}

.blog-post__tag-link {
  font-size: 0.875rem;
}

/* Blog related posts */

.blog-related-posts {
  background-color: #F8FAFC;
  
  article{
    .blog-related-posts__title{
      font-size:25px;
      line-height:normal;'
    }
  }
  
}

.blog-related-posts h2 {
    text-align: left;
    font-size: clamp(40px,5vw,72px);
    margin-bottom: 0!important;
    padding: 11px;
    margin-bottom: 30px !important;
}

.blog-related-posts__list {
  display: flex;
  flex-wrap: wrap;
}

.blog-related-posts__post {
  flex: 0 0 100%;
  padding: 1rem;
}

@media screen and (min-width: 768px) {
  .blog-related-posts__post {
    flex: 0 0 calc(100% / 2);
  }
}

@media screen and (min-width: 1000px) {
  .blog-related-posts__post {
    flex: 0 0 calc(100% / 3);
  }
}

.blog-related-posts__image {
  height: auto;
  max-width: 100%;
}

.blog-related-posts__title {
  margin: 0.7rem 0;
}

/* Blog comments */

.blog-comments {
  margin: 0 auto;
  max-width: 680px;
}

.blog-comments .hs-submit {
  text-align: center;
}

.blog-comments .comment-reply-to {
  border: 0 none;
}

.blog-comments .comment-reply-to:hover,
.blog-comments .comment-reply-to:focus {
  background-color: transparent;
  text-decoration: underline;
}


/*** PROJECT BLOG LISTING ***/

  /* Container framework */
.project-blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  gap: 50px;
  
  .sidebar{
   /*flex:1; */
  }
  .main-projects{
    /*flex:3;*/
  }
  
}

/* Filters UI matching your clean layout */
/* Layout Framework changes */
.project-filter-section {
  margin-bottom: 35px;
  /*border-bottom: 1px solid #e5e7eb;*/
  padding-bottom: 25px;
  position:relative;
  
  @media (max-width: 767px) {
    border-top: 1px solid var(--Colours-UI-border-decorative, #D9DFEB);
    padding-top: 40px;
    
  margin-bottom: 0;
  /*border-bottom: 1px solid #e5e7eb;*/
  padding-bottom: 0;
  }
}

/* Arrange the 3 category blocks nicely */
.filter-groups-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

@media (min-width: 992px) {
  .filter-groups-wrapper {
    flex-direction: column;
    justify-content: space-between;
  }
  .filter-group {
    flex: 1;
    margin-right: 0px;
  }
  .filter-group:last-child { margin-right: 0; }
}

.filter-group h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #161e2e;
  margin: 0 0 10px 0;
}

.tag-filters-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  
  @media(max-width:767px){
    flex-direction: row; 
    flex-wrap: wrap; 
  }
}

/* Checkbox Style updates */

.tag-checkbox-label{
 &:hover{
   .custom-tag-ui{
     background-color:#161e2e;
     color:#fff;
   }
  }
}
.tag-checkbox-label input { display: none; }
.tag-checkbox-label .custom-tag-ui {
  display: inline-block;
  padding: 10px 12px;
  background: #f2f4f8;
  color: #161E2E;
  border-radius: 0px;
  cursor: pointer;
  font-size: 16px;

  transition: background 0.2s;
  width:100%;
  
    font-family: Geist, sans-serif;
    font-style: normal;
    font-weight: normal;
  
}

.tag-checkbox-label input:checked + .custom-tag-ui {
  background:#161e2e;
  color: #fff;
}

/* Clear Filters Action Button alignment */
.clear-btn {
    /* display: none; */
    position: absolute;
    top: 0;
    right: 0;
    color: var(--Colours-UI-ink-secondary, #2B3446);
    font-family: "Fragment Mono";
    font-size: var(--Type-scale-body-s, 14px);
    font-style: normal;
    font-weight: 400;
    line-height: 105%;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-skip-ink: auto;
    text-decoration-color: var(--Colours-UI-border-AA, #8B94A6);
    text-decoration-thickness: 7.5%;
    text-underline-offset: 20%;
    text-underline-position: from-font;
    text-transform: uppercase;
}



.tag-checkbox-label input { display: none; }
.tag-checkbox-label .custom-tag-ui {
  display: inline-block;
  padding: 10px 12px;
  background: #f2f4f8;
  color: #161E2E;
  border-radius: 0px;
  cursor: pointer;
  font-size: 16px;

  transition: background 0.2s;
  width:100%;
  
    font-family: Geist, sans-serif;
    font-style: normal;
    font-weight: normal;
  
}
.tag-checkbox-label input:checked + .custom-tag-ui {
  background: #161e2e;
  color: #fff;
}
.clear-btn {
    /* display: none; */
    position: absolute;
    top: 0;
    right: 0;
    color: var(--Colours-UI-ink-secondary, #2B3446);
    font-family: "Fragment Mono";
    font-size: var(--Type-scale-body-s, 14px);
    font-style: normal;
    font-weight: 400;
    line-height: 105%;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-skip-ink: auto;
    text-decoration-color: var(--Colours-UI-border-AA, #8B94A6);
    text-decoration-thickness: 7.5%;
    text-underline-offset: 20%;
    text-underline-position: from-font;
    text-transform: uppercase;
}

/* The Advanced Asymmetrical Layout Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .blog-grid {
    /* Establish a strict 3-column track system */
    grid-template-columns: repeat(3, 1fr); 
  }

  /* --- Row 1 Configuration --- */
  /* Post 1: Spans 2 columns (wider left card) */
  .blog-grid > .blog-card:nth-child(1) {
    grid-column: span 2;
    height:380px;
  }

  /* --- Row 2 Configuration --- */
  /* Post 4: Spans 2 columns (wider right card) */
  .blog-grid > .blog-card:nth-child(4) {
    grid-column: span 2;
    height:380px;
    
 
  }
  
}

@media(max-width:767px){
  
 .blog-grid > .blog-card:nth-child(1) {
   order:-1;
   aspect-ratio: 343 / 178;
 }
  
 .blog-grid > .blog-card:nth-child(4) {
    aspect-ratio: 343 / 178;
    order:-1;
 }
  
  .blog-grid > .blog-card{
    
  }
  
}


/* Base Card UI Rules */
.blog-card {
  background: #f4f5f7;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;

}

/* Match layout styling based on grid positions automatically */

  
  /* Apply "Featured Text-Over-Image" style to Post 1 and Post 4 */
  .blog-grid > .blog-card:nth-child(1),
  .blog-grid > .blog-card:nth-child(4) {
    justify-content: flex-end;
    
    .featured-card-link{
      h2{
        color: var(--Colours-UI-Inverse-ink-inverse-primary, #FFF);
        font-family: var(--Font-families-headings, Geist);
        font-size: var(--Type-scale-heading-m, 34px);
        font-style: normal;
        font-weight: 500;
        line-height: 110%;
        letter-spacing: -1.02px;
        
          @media(max-width:767px){
            font-size:18px !important; 
          }
        
      }
    }
  }

  .blog-grid > .blog-card:nth-child(1) .featured-card-link,
  .blog-grid > .blog-card:nth-child(4) .featured-card-link {
    text-decoration: none;
    color: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: 30px;
    background-size: cover;
    background-position: center;
    justify-content: space-between;
  }

  /* Style all other posts as standard text-on-top, image-on-bottom cards */
  .blog-grid > .blog-card:nth-child(2),
  .blog-grid > .blog-card:nth-child(3),
  .blog-grid > .blog-card:nth-child(n+5) {
    justify-content: space-between;
    background: #f4f5f7;
      height:380px; 
    
    @media(max-width:767px){
      height: unset;
      flex-direction: row;
      position: relative;
      aspect-ratio: 343 / 79;
    }
    
    @media(max-width:449px){
      aspect-ratio: unset;
    }
    
    .card-text-wrapper{
      flex: 1;
      padding: 0 20px;
      margin-top: 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      margin-bottom: 20px;
      
      @media(max-width:767px){
        flex: 3;
        padding: 10px;
        margin-top: 0px;
        margin-bottom: 0;
        order: 1; 
      }
      
    }
    .card-image-wrapper{
      flex:1;
      height:unset;
      
      img{
       aspect-ratio:1 / 1; 
      }
    }
    
  }




.blog-card.is-featured {
  background-size: cover;
  background-position: center;
  justify-content: flex-end;
}
.featured-card-link {
  text-decoration: none;
  color: #ffffff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  
  @media(max-width:767px){
    padding:20px !important; 
  }
}
.card-inner-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 15px 0;
  line-height: 1.2;
  
  
}

/* Standard Layout Variants (Top text, bottom image) */
.blog-card.standard-card {
  justify-content: space-between;
  background: #f4f5f7;
}
.card-text-wrapper {
  padding: 24px;
}
.card-text-wrapper h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 15px 0;
  
  @media(max-width:767px){
    font-size: 16px;
    margin:  0 !important;
    
    line-height: 19px;
  }
}
.card-text-wrapper h2 a {
  color: #161e2e;
  text-decoration: none;
}
.card-image-wrapper {
  height: 200px;
  overflow: hidden;
  width: 100%;
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Shared Typography Elements */
.card-tag-label {
  font-size: 14px;
  text-transform: capitalize;
  color: #6b7280;
  font-weight: 400;
}
.blog-card.is-featured .card-tag-label {
  color: #e5e7eb;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.featured-badge {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

/* Minimalist Pagination Bar */
.project-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}
.pagination-btn {
    padding: 0;
    color: var(--Colours-UI-ink-secondary, #2B3446);
    font-family: "Fragment Mono";
    font-size: var(--Type-scale-body-s, 14px);
    font-style: normal;
    font-weight: 400;
    line-height: 105%;
    text-transform: uppercase;
    background: transparent;
    border: 0;
  
  &:hover{
   border:0 !important; 
    background: transparent;
    color: var(--Colours-UI-ink-secondary, #2B3446);
  }
}
.pagination-btn:disabled {
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  background: transparent;
}
#page-indicator {
  font-weight: 500;
  color: #4b5563;
}
  
  
  /* Container holding the page numbers */
.numeric-pages-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Base style for individual numbers */
.page-num-btn {
    display: flex;
    width: 36px;
    height: 36px;
    justify-content: center;
    align-items: center;
    padding: 0;
    border-radius: 50%;
    background-color: transparent;
    color: var(--Colours-UI-ink-primary, #161E2E);
    font-family: "Fragment Mono";
    font-size: var(--Type-scale-body-s, 14px);
    font-style: normal;
    font-weight: 400;
    line-height: 105%;
    text-transform: uppercase;
    border: 1px solid var(--Colours-Senversa-brand-greenery, transparent);
}

.page-num-btn:hover {
  background-color: transparent;
  border-color: #161e2e;
  color: var(--Colours-UI-ink-primary, #161E2E);
  border-radius: 50%;
}

/* Styling for the currently active page number */
.page-num-btn.is-active {
  border: 1px solid var(--Colours-Senversa-brand-greenery, #75B94E);
  cursor: default;
}

/* Ensure the wrapper looks balanced across desktop and mobile screens */
.project-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 25px;
  margin-top: 20px;
}

.project-blog-container{
  
  padding-bottom:100px;


    h3.heading{
      color: var(--Colours-UI-ink-primary, #161E2E);
      /* Headings/heading-xs */
      font-family: var(--Font-families-headings, Geist);
      font-size: var(--Type-scale-heading-xs, 20px);
      font-style: normal;
      font-weight: 500;
      line-height: 120%; /* 24px */
      letter-spacing: -0.4px;
   }
  
  .search-keyword{
   margin-bottom:30px; 
  }
  
  .keyword{
        display: flex;
        height: 46px;
        padding: 6px 6px 6px 12px;
        justify-content: space-between;
        align-items: center;
        align-self: stretch;
        border-radius: 4px;
        border: 1px solid var(--Colours-UI-border-decorative, #D9DFEB);
        width:100%;
      
        background-image:url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/Search.svg);
        background-repeat:no-repeat;
        background-position: right 10px center;
        padding-right: 15px;
  }
  
  
  .sidebar-nav__header {
    align-items: center;
    border-top: 1px solid #e1e4e8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: 20px 10px;
    user-select: none;
    /*padding-bottom: 10px;
    padding-top: 25px;*/
    transition: padding 0.3s ease-in-out;
}

.is-closed .sidebar-nav__header {
  padding:20px 10px !important;
}

/* Arrow Animation */
.sidebar-nav__arrow {
  transition: transform 0.3s ease;
  color: #6a737d;
      color: #6a737d;
    transition: transform .3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.is-closed .sidebar-nav__arrow {
  transform: rotate(-90deg); /* Points left/down when closed */
}

/* Toggle Content Logic */
.sidebar-nav__content {
  max-height: 1000px; /* Large enough to fit content */
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 1;
      margin: 0px 0px 30px;
}

.is-closed .sidebar-nav__content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  margin:0;
}

/* Keep original item styling... */
.sidebar-nav__list {  
    list-style: none;
    padding: 15px 0;
    display:grid;
    gap:10px;

    li{
          /* display: flex; */
          background-color: #F2F4F8;
      transition: background-color 0.3s ease;
      
      .sidebar-nav__link{
           align-items: center;
          display: flex;
          gap: 10px;
          padding: 10px;
          text-decoration: none; 
      }
      
      &:hover{
          background-color: #161E2E;
        a,label{
          color:#fff;
          img{
                filter: brightness(0) invert(1);
          }
              
        }
      }
      
      &.is-active{
          background-color: #161E2E;
        a{
          color:#fff;
          img{
                filter: brightness(0) invert(1);
          }
              
        }
      }
      
      a{
            display: flex;
            gap: 10px;
            padding: 10px;
            text-decoration: none;
            align-items: center;
        img{
              width: 14px;
        }
      }
      
    }

}

.sidebar-left{
      display: flex;
    gap: 10px;
}

.sidebar-nav__title{
  color: var(--Colours-UI-ink-secondary, #2B3446);
  font-family: "Fragment Mono";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 105%; /* 14.7px */
  text-transform: uppercase;
}

  
#clear-filters{
    display: inline-block;
    background: transparent;
    border: 0;
    padding: 0;
  top:5px;
  
  &:hover{
    color:#2b3446;
  }
}

.project-wrapper{
    padding-left: 20px !important;
    padding-right: 20px  !important;
}

#project-blog-grid{
  .blog-card{
    transition: transform .3s ease;
    
    &:hover{
     transform: translateY(-5px); 
    }
   .stretch-link{
     &:before{
       content:'';
       position:absolute;
       left:0;
       top:0;
       width:100%;
       height:100%;
     }
    }
  }
}

  #sector-filters{

    .tag-checkbox-label{

      &.sector-energy{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-energy.svg);
        }
      }
      
      &.sector-finance-and-legal{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-legal.svg);
        }
      }
      
      &.sector-land-development{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-property.svg);
        }
      }
      
      &.sector-government{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-government.svg);
        }
      }
      
      &.sector-transport-and-infrastructure{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-transport.svg);
        }
      }
      
      &.sector-manufacturing{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-industrial.svg);
        }
      }
      
      &.sector-mining-and-resources{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-mining.svg);
        }
      }
      
      &.sector-waste{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-waste.svg);
        }
      }
      
      &.sector-water{
        .custom-tag-ui:before{
          background-image: url(https://442270077.fs1.hubspotusercontent-ap1.net/hubfs/442270077/raw_assets/public/senversa-theme/images/sectors/icon-sector-water.svg);
        }
      }

      input:checked + .custom-tag-ui{
          &:before{
           filter: brightness(0) invert(1);
          }
      }

      &:hover{
        .custom-tag-ui{
         &:before{
           filter: brightness(0) invert(1);
          }
        }
      }

      .custom-tag-ui{
      position: relative;
      display: flex;
      align-items: center;
      gap: 10px;
        &:before{
          content: '';
          width: 15px;
          height: 15px;

          background-size: contain;
          background-repeat: no-repeat;
      /* filter: brightness(0) invert(1); */
        }

      }
    }
  }
  
  #project-banner-section{
    background-color: #f2f4f8!important;
    padding:0;
    padding-top:80px !important;
  }
  
  #project-related-section{
    background-color: #f2f4f8!important;
    padding-bottom:0 !important;
  }