/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bc-worklist {
	display: flex;
	align-items: center;
	min-height:50vw;
	position: relative;
	transition: background .4s ease-in-out;
}
@media (min-width:1921px) {
	.bc-worklist {
      min-height:75vh;
	}
}
.bc-worklist .wp-block-group__inner-container {
	width: 100%;
}

.bc-worklist .bc-worklist__single {
	display: flex;
	align-items:center;
}
.bc-worklist:nth-child(odd) .bc-worklist__single {
	flex-direction: row-reverse;
}
.bc-worklist .bc-worklist__single .wp-block-column {
	padding-left:4rem;
	padding-right:4rem;
}



.bc-worklist h2 {
	font-family: lato, sans-serif;
	font-size:7.5rem;
	font-weight: 800;
	line-height: 1em;
	word-break: keep-all;
    overflow-wrap: normal;
}

.bc-worklist h2 + p {
	font-size:2rem;
	font-family: 'Playfair Display', serif;
	font-style: normal;
	font-weight: 800;
	line-height: 1.2em;
}
.bc-worklist:hover h2,.bc-worklist:hover p,.bc-worklist:hover .button.learn-more { transition: color .4s ease-in-out; color:white; }

.worklist-masonry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  width: 100%;
  /* Each row's height is 16:9 of the wide column (2/3 of container) */
  grid-auto-rows: calc((min(1920px, 100vw) - 5rem) * 2 / 3 * 0.5625); /*grid-auto-rows: calc((100vw - 2rem) * 2 / 3 * 0.5625);*/
}

@media (max-width: 900px) {
  .worklist-masonry-grid {
    grid-template-columns: 1fr;
    /* grid-auto-rows: calc(100vw * 0.5625); */
  }
  
  .worklist-item:hover {
    transform: none; /* Disable hover effects on mobile */
  }
  
  .worklist-item:active {
    transform: scale(0.98); /* Add touch feedback */
  }
}

.row-odd.col-1,
.row-odd.col-2,
.row-even.col-1,
.row-even.col-2 {
  aspect-ratio: unset;
  height: 100%;
}

.worklist-item {
  position: relative;
  overflow: hidden;
  /* border-radius: 1rem; */
  min-width: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* .worklist-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.worklist-item:focus {
  outline: 3px solid var(--work-color, #0B2C71);
  outline-offset: 2px;
} */

/* Default: odd rows (row-odd): large left, small right */
.row-odd.col-1 {
  /*grid-column: 1 / 2;
  aspect-ratio: 2 / 1;*/
  grid-column: 1 / 3;
}
.row-odd.col-2 {
  /*grid-column: 2 / 3;
  aspect-ratio: 1 / 1;*/
  grid-column-start: 3;
}

/* Even rows (row-even): small left, large right */
.row-even.col-1 {
  /*grid-column: 1 / 2;
  aspect-ratio: 1 / 1;*/
  grid-column: 1 / 2;
}
.row-even.col-2 {
  /*grid-column: 2 / 3;
  aspect-ratio: 2 / 1;*/
  grid-column: 2 / 4;
}

/* Remove old nth-child rules */
/* .worklist-masonry-grid > .worklist-item:nth-child(1) { grid-column: 1 / 2; }
.worklist-masonry-grid > .worklist-item:nth-child(2) { grid-column: 2 / 3; }
.worklist-masonry-grid > .worklist-item:nth-child(3) { grid-column: 1 / 2; }
.worklist-masonry-grid > .worklist-item:nth-child(4) { grid-column: 2 / 3; } */

.worklist-thumb {
  width: 100%;
  /* height: 100%; */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.worklist-thumb:has(img) {
  height: 100%;
}
.worklist-thumb > * {
  width:100%;
}
.worklist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.worklist-hover-overlay {
  position: absolute;
  inset: 0;
  background: var(--work-color, #222);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  z-index: 2;
}
.worklist-item:hover .worklist-hover-overlay {
  opacity: 1;
}
/* .worklist-item:hover img {
  opacity: 0.2;
} */
.worklist-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.worklist-title-logo {
  color: #fff;
  font-size: 2.5rem;
  line-height: 1em;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Responsive */
@media (max-width: 1023px) {
  .worklist-masonry-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: auto;
    padding: 0 2rem;
    /* grid-auto-rows: calc(100vw * 0.5625); */
  }

  .row-odd.col-1 {
      grid-column: auto / span 6;
  }
  .row-odd.col-2 {
      grid-column: auto / span 3;
  }
  .row-even.col-1 {
      grid-column: auto / span 3;
  }
  .row-even.col-2 {
      grid-column: auto / span 6;
  }
  
  .worklist-item:hover {
    transform: none; /* Disable hover effects on mobile */
  }
  
  .worklist-item:active {
    transform: scale(0.98); /* Add touch feedback */
  }
}