/* ===== PROYECTOS GRID ===== */
.proyectos-grid {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 10px;
  align-items: flex-start;
  overflow: visible;
}
.proyectos-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  will-change: transform;
}
.proyectos-col:nth-child(1) { animation: colFloat1 16s ease-in-out infinite; }
.proyectos-col:nth-child(2) { animation: colFloat2 21s ease-in-out infinite; }
.proyectos-col:nth-child(3) { animation: colFloat1 18s ease-in-out infinite 3s; }
.proyectos-col:nth-child(4) { animation: colFloat2 14s ease-in-out infinite 1.5s; }
@keyframes colFloat1 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-28px); } }
@keyframes colFloat2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(28px); } }
.grid-item {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  cursor: pointer;
}
.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.grid-item:hover img { transform: scale(1.06); }
/* Names hidden in grid */
.grid-item__name { display: none; }

/* ===== GALLERY OVERLAY ===== */
/* Full-screen dark backdrop, image floats centered */
.gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.gallery-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.gallery-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 92vw;
  /* pointer-events inherits from parent: none when closed, all when overlay.active */
}

.gallery-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 32px;
  color: rgba(247,241,228,0.7);
  opacity: 1;
  transition: color 0.2s;
  z-index: 10;
  line-height: 1;
}
.gallery-close:hover { color: var(--cream); }

/* arrow | photo | arrow row */
.gallery-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  padding: 0 28px;
  max-height: 72vh;
}

.gallery-photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 72vh;
  flex: 1;
  min-width: 0;
}
.gallery-photo-wrap img {
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.28s ease;
}
.gallery-photo-wrap img.fading { opacity: 0; }

/* Simple chevron arrows */
.gallery-arrow {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.2s, transform 0.18s;
}
.gallery-arrow:hover { opacity: 1; transform: scale(1.1); }
.gallery-arrow svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-project-name {
  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(247,241,228,0.75);
  text-transform: uppercase;
  text-align: center;
  flex-shrink: 0;
}
