/* =========================================================
   GALLERY PAGE (CLEAN & STABLE)
========================================================= */

body.gallery-page {
  margin: 0;
 
  color: var(--forest);
}

/* ===== HEADER ===== */
.gallery-header {
  text-align: center;
  max-width: 1100px;
  margin: 10px auto 10px;
  padding: 0 20px;
}

.gallery-header h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin: 0 0 10px;
}

.gallery-header p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2px;
  letter-spacing: 0.2px;
}

/* ===== LABELS ===== */
.gallery-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  max-width: 1000px;
  margin: 0 auto 2px;
  padding: 0 20px;
  align-items: center;
}

.gallery-labels div {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.75;
}

.arrow-label {
  font-size: 1.5rem;
  opacity: 0.7;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.gallery-labels:hover .arrow-label {
  transform: translateX(4px);
  opacity: 0.9;
}

/* ===== GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto 60px;
  padding: 0 20px;
  counter-reset: row;
}

/* ===== ITEMS ===== */
.gallery-item {
  text-align: center;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  -webkit-tap-highlight-color: transparent;
}

/* ===== TEXT ===== */
.gallery-item h2 {
  margin: 0;
}

.gallery-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===== ROW NUMBERS ===== */
.gallery-item:nth-child(2n+1) {
  counter-increment: row;
}

.gallery-item:nth-child(2n+1)::before {
  content: counter(row);
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: bold;
  color: grey;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  text-align: center;
  color: white;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: 8px;
}

.lightbox-content h3 {
  margin-top: 10px;
  margin-bottom: 4px;
}

.lightbox-content p {
  margin: 0;
  opacity: 0.85;
}

/* ===== ARROWS ===== */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  opacity: 0.6;
  cursor: pointer;
}

.arrow.left { left: 30px; }
.arrow.right { right: 30px; }

.arrow:hover {
  opacity: 1;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .arrow {
    display: none;
  }
}