/* ===== Lab Page ===== */

.lab-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--gnb-height) + var(--gnb-top) + 184px) 40px 120px;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

/* Category Section */
.lab-category__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 60px;
}

/* Gallery Grid — 40px gap per Figma */
.lab-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Lab Item */
.lab-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.lab-item:hover .lab-item__thumb {
  opacity: 0.85;
}

div.lab-item {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

div.lab-item:hover {
  transform: scale(1.10);
}

/* Thumbnail */
.lab-item__thumb {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

/* Natural aspect ratio (Graphic & Marketing) */
.lab-gallery--natural .lab-item__thumb {
  aspect-ratio: auto;
  border-radius: 16px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.lab-gallery--natural .lab-item__thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: unset;
}

.lab-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a.lab-item:hover .lab-item__thumb img {
  transform: scale(1.06);
}

.lab-item__thumb--placeholder {
  background: #EBEBEB;
}

/* Info block — thumb → tag → title */
.lab-item__info {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* Title */
.lab-item__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Arrow icon */
.lab-item__arrow {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
  flex-shrink: 0;
}

/* Reveal animation */
.lab-category.reveal {
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Responsive ===== */
/* BP2 — tablet */
@media (max-width: 1024px) {
  .lab-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  .lab-category__title { font-size: 28px; }
}

/* BP3 — mobile */
@media (max-width: 768px) {
  .lab-main {
    padding: calc(var(--gnb-height) + var(--gnb-top) + 48px) 20px 80px;
    gap: 56px;
  }
  .lab-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .lab-category__title { font-size: 24px; }
  .lab-item__title { font-size: 16px; }
}

.lab-row-flex {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

/* A 3-column row that follows a flex row */
.lab-gallery--follow { margin-top: 40px; }

.lab-row-flex .lab-item {
  min-width: 0;
}

.lab-row-flex .lab-item__thumb {
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}

.lab-row-flex .lab-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 480px) {
  .lab-gallery { grid-template-columns: 1fr; }
  .lab-row-flex { flex-direction: column; }
}
