/* ===== GALLERY PAGE LAYOUT ===== */

body {
  padding-top: 30px;
}

.container {
  padding: 2rem;
  min-height: calc(100vh - 40px);
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 5px;
  margin-bottom: 4rem;
}

.art-card {
  aspect-ratio: 1;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  border: 1px solid var(--color-3);
  overflow: hidden;
  width: 100%;
}

.art-card:hover {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.art-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 1rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 5, 3, 0.85);
  display: flex;
  gap: 1rem;
  flex: 1;
  z-index: 999;
  padding: auto 3rem;
}

.card-side {
  display: flex;
  flex: 0.6;
  justify-content: center;
  align-items: center;

  /* width: 100%; */
  max-width: 70vw;
  padding-left: 30px;
  pointer-events: none;
}

.lightbox-card {
  pointer-events: all;
  display: flex;
  flex-shrink: 1;
  flex-direction: column;
  padding: 10px;
  height: fit-content;
  position: relative;
  background-color: rgba(245, 242, 242, 0.95);
  transform: translateY(-50px) rotate(-2deg);
}

.artwork {
  display: block;
  max-height: 75vh;
  max-width: 60vw;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox h2 {
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: bold;
  word-wrap: break-word;
  margin: 0;
  text-align: right;
}

.desc-side {
  display: flex;
  flex: 0.4;
  padding-left: 10px;
  padding-right: 10px;
  align-items: center;
  pointer-events: none;
}

.lightbox p {
  color: var(--gold);
  font-size: clamp(18px, 2vw, 30px);
  line-height: 1.5;
  margin: 0;
  word-wrap: break-word;
  min-width: 200px;
  max-width: 30vw;
}
.image-hand {
  position: absolute;
  width: 330px;
  height: auto;
  top: 100%;
  bottom: auto;
  left: 0;
  transform: translateY(-58px);
  max-width: none !important;
  max-height: none !important;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  border: 3px solid var(--dark);
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  z-index: 1000;
}

.lightbox-close:hover {
  background-color: #a0522d;
  transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 940px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  .header {
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    /* justify-content: flex-end; */
    gap: 0rem;
    padding: 0px;
    z-index: 999;
  }

  .card-side {
    max-width: 100%;
    width: 100%;
    padding: 10px;
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
  }

  .lightbox-card {
    max-height: 100%;
    padding: 10px;
    transform: translateY(0px);
  }

  .desc-side {
    flex: 0 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }

  .artwork {
    max-height: 80vh;
    max-width: 95vw;
    height: auto;
    width: auto;
  }

  .lightbox p {
    max-width: 90vw;
    min-width: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding: 10px;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}
