/* ============================================================
   2 Amigos + Hijos Aberturas — Proyectos
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.proy-hero {
  position: relative;
  height: 75vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  background-image: url('../../Assets/images/proyectos/hero 3.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.proy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65));
  z-index: 1;
}

.proy-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.proy-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

.proy-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.proy-hero__breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.proy-hero__breadcrumb span {
  color: rgba(255, 255, 255, 0.3);
}

.proy-hero__label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.proy-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.05;
}

.proy-hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.6;
  max-width: 52ch;
}

/* ══════════════════════════════════════════════════════════════
   GRID SECTION
   ══════════════════════════════════════════════════════════════ */
.proy-grid {
  background: #111111;
  padding-top: 80px;
}

.proy-grid--flush {
  padding-top: 0;
}

/* ══════════════════════════════════════════════════════════════
   PROY-ITEM BASE
   ══════════════════════════════════════════════════════════════ */
.proy-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.proy-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.proy-item:hover img {
  transform: scale(1.03);
}

.proy-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.10) 40%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  opacity: 1;
}

.proy-item__info {
  width: 100%;
  padding: var(--space-3) var(--space-3) calc(var(--space-3) + 2px);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.proy-item__num {
  display: block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-white);
  line-height: 1.3;
}

.proy-item__loc {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════
   COLLAGE SLIDER
   ══════════════════════════════════════════════════════════════ */
.proy-slider {
  position: relative;
}

/* ── Page base ───────────────────────────────────────────────── */
.proy-collage-page {
  display: none;
}

.proy-collage-page.is-active {
  display: block;
}

/* ── Fade animations ─────────────────────────────────────────── */
@keyframes proy-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes proy-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.proy-collage-page.is-fading-in {
  animation: proy-fade-in 0.4s ease forwards;
}

.proy-collage-page.is-fading-out {
  animation: proy-fade-out 0.4s ease forwards;
}

/* ── Row B — 2 iguales ───────────────────────────────────────── */
.proy-row-b {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.proy-row-b .proy-item {
  flex: 1;
  height: 380px;
}

/* ── Row C — asimétrica 60/40 ────────────────────────────────── */
.proy-row-c {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.proy-row-c .proy-item:first-child {
  flex: 60;
  height: 420px;
}

.proy-row-c .proy-item:last-child {
  flex: 40;
  height: 420px;
}

/* Quitar margen de la última fila de cada página */
.proy-collage-page > .proy-row-b:last-child,
.proy-collage-page > .proy-row-c:last-child {
  margin-bottom: 0;
}

/* ── Barra de navegación unificada (abajo del todo) ─────────── */
.proy-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 0 18px;
  background: #111111;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.proy-nav__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background   0.2s ease,
    border-color 0.2s ease;
}

.proy-nav__btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.70);
}

.proy-nav__btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.proy-nav__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.proy-nav__indicator {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  user-select: none;
  min-width: 36px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   STATS BANNER — divisor interno del grid
   ══════════════════════════════════════════════════════════════ */
.proy-stats {
  background: #111111;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.proy-stats__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.proy-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 64px;
}

.proy-stat + .proy-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.proy-stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
}

.proy-stat__label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 8px;
  line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════
   CTA FINAL
   ══════════════════════════════════════════════════════════════ */
.proy-cta {
  background: #111111;
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.proy-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 600px;
  margin-inline: auto;
}

.proy-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
}

.proy-cta__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.65;
}

.proy-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  padding: 15px 36px;
  border-radius: var(--radius-md);
  text-decoration: none;
  margin-top: 8px;
  transition:
    background     var(--duration-fast) var(--ease-out),
    color          var(--duration-fast) var(--ease-out),
    border-color   var(--duration-fast) var(--ease-out);
}

.proy-cta__btn:hover {
  background: var(--color-white);
  color: #111111;
  border-color: var(--color-white);
}

/* ══════════════════════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════════════════════ */
.proy-lb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.proy-lb.is-open {
  display: flex;
}

.proy-lb__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.proy-lb__close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-white);
  padding: 8px;
  line-height: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
  z-index: 9001;
}

.proy-lb__close:hover { opacity: 0.65; }

.proy-lb__close svg {
  width: 32px;
  height: 32px;
}

.proy-lb__btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-white);
  cursor: pointer;
  padding: 18px 14px;
  line-height: 0;
  transition: background var(--duration-fast) var(--ease-out);
  z-index: 9001;
}

.proy-lb__btn:hover { background: rgba(255, 255, 255, 0.18); }

.proy-lb__btn svg {
  width: 22px;
  height: 22px;
}

.proy-lb__prev { left: 20px; }
.proy-lb__next { right: 20px; }

.proy-lb__counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  z-index: 9001;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .proy-hero {
    height: 50vh;
    min-height: 320px;
  }

  .proy-grid {
    padding-top: 0;
  }

  .proy-row-b,
  .proy-row-c {
    flex-direction: column;
    gap: 12px;
  }

  .proy-row-b { margin-bottom: 12px; }
  .proy-row-c { margin-bottom: 12px; }

  .proy-row-b .proy-item {
    flex: none;
    width: 100%;
    height: 240px;
  }

  .proy-row-c .proy-item:first-child,
  .proy-row-c .proy-item:last-child {
    flex: none;
    width: 100%;
    height: 240px;
  }

  .proy-nav-bar {
    padding: 12px 0 16px;
    gap: 16px;
  }

  .proy-nav__btn {
    width: 32px;
    height: 32px;
  }

  .proy-nav__btn svg {
    width: 16px;
    height: 16px;
  }

  .proy-stats__inner {
    flex-direction: column;
    gap: var(--space-5);
  }

  .proy-stat { padding: 0 24px; }

  .proy-stat + .proy-stat {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--space-4);
  }

  .proy-cta { padding: 72px 0; }

  .proy-lb__btn { padding: 14px 10px; }
  .proy-lb__prev { left: 8px; }
  .proy-lb__next { right: 8px; }
}

@media (max-width: 480px) {
  .proy-hero__inner { gap: 14px; }
}
