/* ═══════════════════════════════════════════════════════════ */
/* PROYECTOS EJECUTADOS — Video BG + Mosaic + Lightbox         */
/* ═══════════════════════════════════════════════════════════ */

/* ── Impact Stats ── */
.impact-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 900px;
}

@media (max-width: 768px) {
  .impact-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

.impact-stat {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.3s;
}
.impact-stat:hover {
  border-color: rgba(200, 30, 30, 0.5);
  transform: translateY(-4px);
}

.impact-num {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 50%, #8a8a8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.impact-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: #c81e1e;
  margin-left: 2px;
  vertical-align: super;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
}

.impact-stat p {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
  margin-bottom: 0;
}

/* Variant: video solo, sin mosaico encima */
.proyectos-video-only {
  min-height: 70vh;
  padding: 0;
}

/* Variant: mosaico standalone (fuera del video bg) */
.proyectos-mosaic-standalone {
  position: relative;
  z-index: auto;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Mosaic Section ── */
.proyectos-mosaic-section {

  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 40px;
}

.proyectos-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.proyectos-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.78) 100%
  );
  z-index: 1;
}

/* ── Mosaic Grid ── */
.proyectos-mosaic {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 10px;
  width: 100%;
  max-width: 1100px;
}

@media (max-width: 768px) {
  .proyectos-mosaic { grid-template-columns: repeat(2, 1fr); }
  .proyectos-mosaic-section { padding: 60px 20px; }
}
@media (max-width: 480px) {
  .proyectos-mosaic { grid-template-columns: 1fr; }
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.35s,
              box-shadow 0.35s;
}

.mosaic-item:hover {
  transform: scale(1.03) translateY(-4px);
  border-color: rgba(200, 30, 30, 0.6);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(200, 30, 30, 0.3);
  z-index: 5;
}

/* Featured center item — slightly larger */
.mosaic-item.mosaic-featured {
  grid-column: 2;
  grid-row: 1 / 3;
  aspect-ratio: unset;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  filter: brightness(0.85) saturate(0.9);
}

.mosaic-item:hover img {
  transform: scale(1.07);
  filter: brightness(1) saturate(1.1);
}

.mosaic-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 14px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.75);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.mosaic-item:hover .mosaic-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ── Lightbox ── */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.93);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-modal img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox-modal.active img {
  transform: scale(1);
}

.lightbox-modal p {
  margin-top: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-close:hover {
  background: rgba(200, 30, 30, 0.3);
  border-color: rgba(200, 30, 30, 0.6);
}
