/* 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;
}

/* Related Work Section */
.related-work-section {
  padding: 4rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.related-work-title {
  font-family: 'Lato', sans-serif;
  font-size: 3rem;
  font-weight: bold;
  line-height: 1.2em;
  text-align: center;
  color: #333;
}

.related-work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
}

.related-work-item {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 1;
}

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

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

.related-work-thumb {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-work-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.related-work-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;
}

.related-work-item:hover .related-work-hover-overlay {
  opacity: 0.9;
}

.related-work-title {
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.2em;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  padding: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .related-work-section {
    padding: 2rem 1rem;
  }
  
  .related-work-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .related-work-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .related-work-item {
    aspect-ratio: 16/9;
  }
  
  .related-work-item:hover {
    transform: none; /* Disable hover effects on mobile */
  }
  
  .related-work-item:active {
    transform: scale(0.98); /* Add touch feedback */
  }
}

@media (max-width: 480px) {
  .related-work-title {
    font-size: 1.5rem;
  }
  
  .related-work-grid {
    gap: 1rem;
  }
}