.project-grid {
  display: block; /* let Isotope handle layout */
  opacity: 0;
  transition: opacity 0.4s ease;
  font-size: 0;
  position: relative;
}

.grid-sizer,
.grid-item {
  width: 32%;
  box-sizing: border-box;
}

.gutter-sizer {
  width: 2%;
}

.grid-item {

  display: inline-block;
  vertical-align: top;
}

.grid-item--width2 {
  width: 66%;
}

.grid-item--height2 .wrapper {
  height: 500px;
}

.wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.filters-button-group button {
  cursor: pointer;
  padding: 6px 12px;
  background: #eee;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  color:black;
}
.filters-button-group button:hover{
    background-color: #ab1e30 ;
}

.filters-button-group > div:first-child button.is-checked {
  background: #ab1e30;
  color: #fff;
}


.project-grid.loaded,
.filters-button-group.visible {
  opacity: 1;
}

/* title overlay */
.overlay-title {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  text-align: left;
}

.grid-item:hover .overlay-title {
  opacity: 1;
}

.overlay-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-sectors {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
}

.sector-name {
  color: #fff;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
}



@media (max-width: 768px) {
  .overlay-title {
    display:none;
    padding: 1rem;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-sectors {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .overlay-title {
    padding: 0.75rem;
  }

  .project-title {
    font-size: 1.25rem;
  }

  .project-sectors {
    font-size: 0.75rem;
    gap: 0.5rem;
  }
}


/* view buttons */ 
.filters-button-group {
  display: flex;
  gap: 10px;
   margin-bottom: 30px;
  justify-content: space-between;
  max-width: calc(100% - 20px); /* adjusts for 20px gutter on each side */
  align-items: center;
  flex-wrap: wrap;
  vertical-align:bottom;
  transition: opacity 0.4s ease;
}

.view-toggle button {
  background: none !important;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.view-toggle button.is-active {
  opacity: 1;
}




/* isotope vertical */ 
.project-grid.list-view{
    width: 50% !important;
}
#isotope_list.list-view .grid-item {
  width: 100% !important;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
}

#isotope_list.list-view .wrapper {
  display: none;
  position: absolute;
  top: 0;
  left: 100%; /* shift to the right side of the row */
  margin-left: 20px;
  width: 400px;
  height: 300px;
  z-index: 999;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

#isotope_list .wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

#isotope_list.list-view .grid-item:hover .wrapper {
  display: block;
}


#isotope_list.list-view .overlay-title {
  position: static;
  opacity: 1;
  background: none;
  padding: 0 1rem;
  flex: 1;
  color: #000;
  transition: background-color 0.2s ease;
}
#isotope_list.list-view .overlay-title:hover {
    background-color:#f5f5f5;
    border-radius:5px;
   
}
#isotope_list.list-view .sector-name {
    color: black;
}

/* project categories */ 

.filters-button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 30px;
}

/* Sector filters should align to the left and grow */
.sector-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-grow: 1;
}

/* View toggle stays on the right */
.view-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* Category filters span full width on next row */




