.image-gallery__project-item {
  /* flex: 1; */
  display: flex;
  align-items: center;
  /* justify-content: start; */
  position: relative;
}

.image-gallery__project-item img {
  max-height: 22rem; /* equivalent to h-104 */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Video play button overlay */
.image-gallery__project-item[data-src*="youtube.com"],
.image-gallery__project-item[data-src*="youtu.be"],
.image-gallery__project-item[data-video] {
  position: relative;
}

.image-gallery__project-item[data-src*="youtube.com"]::after,
.image-gallery__project-item[data-src*="youtu.be"]::after,
.image-gallery__project-item[data-video]::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 10;
  transition: all 0.2s ease;
}

.image-gallery__project-item[data-src*="youtube.com"]:hover::after,
.image-gallery__project-item[data-src*="youtu.be"]:hover::after,
.image-gallery__project-item[data-video]:hover::after {
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%) scale(1.1);
}

.logo-size {
  width: var(--size-6);
  height: var(--size-6);
}

.min-w-600 {
  min-width: 600px;
}

.max-w-420 {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
}

.max-w-720 {
  max-width: 760px;
  width: 100%;
  height: auto;
  display: block;
  /* margin-left: auto;
  margin-right: auto; */
}

/* Responsive project cards */
@media (max-width: 1024px) {
  .table {
    display: block;
  }
  
  .table thead {
    display: none;
  }
  
  .table tbody {
    display: block;
  }
  
  .table tr {
    display: block;
    margin-bottom: var(--size-4);
  }
  
  .table td {
    display: block;
    border: none;
    padding: 0;
  }
  
  /* Project card layout */
  .table tbody tr {
    background-color: var(--color-bg);
    border-radius: var(--rounded-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: var(--size-4);
    margin-bottom: var(--size-4);
  }
  
  /* Hide all td elements by default */
  .table tbody tr td {
    display: none;
  }
  
  /* Show only the td elements we want in card layout */
  .table tbody tr td:nth-child(1),
  .table tbody tr td:nth-child(2),
  .table tbody tr td:nth-child(3),
  .table tbody tr td:nth-child(4),
  .table tbody tr td:nth-child(5) {
    display: block;
  }
  
  /* Header row with avatar, name, year, status */
  .table tbody tr td:nth-child(1),
  .table tbody tr td:nth-child(2),
  .table tbody tr td:nth-child(5) {
    display: inline-block;
    vertical-align: top;
  }
  
  .table tbody tr td:nth-child(1) {
    width: 60px;
    margin-right: var(--size-3);
  }
  
  .table tbody tr td:nth-child(2) {
    width: calc(100% - 80px);
  }
  
  .table tbody tr td:nth-child(5) {
    width: auto;
    text-align: right;
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
  }
  
  /* Tech badges row */
  .table tbody tr td:nth-child(4) {
    margin-top: var(--size-3);
    margin-bottom: var(--size-3);
  }
  
  .table tbody tr td:nth-child(4) .badge {
    margin-right: var(--size-1);
    margin-bottom: var(--size-1);
  }
  
  /* Description row */
  .table tbody tr td:nth-child(3) {
    margin-top: var(--size-3);
    line-height: var(--leading-relaxed);
  }
  
  /* Avatar styling */
  .table tbody tr td:nth-child(1) .logo {
    width: 48px;
    height: 48px;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .table tbody tr td:nth-child(1) .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Project name and year */
  .table tbody tr td:nth-child(2) div:first-child {
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    margin-bottom: var(--size-1);
  }
  
  .table tbody tr td:nth-child(2) .text-sm {
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
  }
  
  /* When no avatar is present, adjust layout */
  .table tbody tr td:nth-child(1):not(:has(.logo)) {
    display: none;
  }
  
  /* When avatar is hidden, adjust name column width */
  .table tbody tr td:nth-child(1):not(:has(.logo)) + td:nth-child(2) {
    width: calc(100% - 20px);
  }
}