/* ============================================
   proyecto.css — estilos para páginas de proyecto
   Complementa style.css del sitio principal.
   Guardá este archivo en: css/proyecto.css
   ============================================ */

.proyecto-page {
  background: var(--fondo);
}

/* ============================================
   HERO DEL PROYECTO
   Cambiá background-image con tu foto real
   ============================================ */
.proyecto-hero {
  position: relative;
  min-height: 68vh;
  display: flex;
  align-items: flex-end;
  background-image: url('../img/proyectos-img/capital-cielorraso-placa-negra/portada\ articulo\ 1.jpg');
  /* ← cambiá esto */
  background-size: cover;
  background-position: center;
  background-color: var(--azul);
}

.proyecto-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(10, 38, 62, 0.95) 0%,
      rgba(10, 38, 62, 0.55) 50%,
      rgba(10, 38, 62, 0.18) 100%);
}

.proyecto-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 2rem;
  padding-top: 120px;
}

.proyecto-volver {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.proyecto-volver:hover {
  color: var(--naranja);
}

.proyecto-volver svg {
  transition: transform 0.2s ease;
}

.proyecto-volver:hover svg {
  transform: translateX(-3px);
}

.proyecto-hero__content h1 {
  font-family: var(--fuente-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: 2px;
  color: var(--blanco);
  line-height: 1;
  margin: 0.75rem 0 1.2rem;
}

.proyecto-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

.proyecto-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.proyecto-meta svg {
  opacity: 0.7;
  flex-shrink: 0;
}

/* ============================================
   LAYOUT PRINCIPAL CON SIDEBAR
   ============================================ */
.proyecto-main {
  padding-bottom: 0;
}

.proyecto-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Grid: columna principal + sidebar fija */
.proyecto-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.proyecto-columna {
  min-width: 0;
  /* evita overflow en grid */
}

/* ============================================
   SECCIÓN RESUMEN
   ============================================ */
.proyecto-resumen {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--gris-borde);
  margin-bottom: 0;
}

.proyecto-resumen h2 {
  font-family: var(--fuente-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: 1px;
  color: var(--azul);
  margin: 0.4rem 0 1.2rem;
  line-height: 1.1;
}

.proyecto-resumen p {
  color: var(--gris-texto);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.9rem;
  max-width: 640px;
}

.proyecto-resumen p:last-of-type {
  margin-bottom: 0;
}

/* FICHA TÉCNICA EN CHIPS — debajo del texto */
.ficha-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  transition: border-color 0.2s ease;
}

.chip:hover {
  border-color: var(--naranja);
}

.chip__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--naranja-dark);
}

.chip__valor {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--azul);
  white-space: nowrap;
}

/* ============================================
   ETAPAS
   ============================================ */
.proyecto-etapa {
  padding: 56px 0;
  border-bottom: 1px solid var(--gris-borde);
}

.proyecto-etapa:last-child {
  border-bottom: none;
}

.proyecto-etapa--oscura {
  background: var(--azul);
  border-radius: 16px;
  padding: 56px 2rem;
  margin: 0 -2rem;
  /* sangra fuera de la columna */
  border-bottom: none;
}

/* Para que la etapa oscura no corte la grilla lateral */
.proyecto-columna .proyecto-etapa--oscura {
  margin: 0;
  border-radius: 12px;
}

.etapa-header {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

.etapa-numero {
  font-family: var(--fuente-display);
  font-size: 5rem;
  line-height: 0.85;
  color: var(--naranja);
  opacity: 0.2;
  user-select: none;
  flex-shrink: 0;
  margin-top: 4px;
}

.etapa-numero--naranja {
  opacity: 1;
}

.etapa-header h2 {
  font-family: var(--fuente-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: 1px;
  color: var(--azul);
  margin-top: 0.5rem;
  line-height: 1.05;
}

.etapa-texto {
  font-size: 0.97rem;
  color: var(--gris-texto);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 0.9rem;
}

/* ============================================
   GALERÍAS DE ETAPA
   ============================================ */
.etapa-galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

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

.etapa-foto {
  border-radius: 9px;
  overflow: hidden;
  height: 200px;
  background: var(--fondo-alt);
}

.etapa-foto img,
.etapa-foto video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.etapa-foto:hover img {
  transform: scale(1.04);
}

.etapa-foto--grandeh {
  grid-column: span 2;
  height: 260px;
}

.etapa-foto--grandev {
  grid-column: span 1;
  height: 400px;
}

.etapa-foto--placeholder {
  background: linear-gradient(135deg, var(--fondo-alt) 0%, var(--gris-borde) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(10, 38, 62, 0.25);
  text-align: center;
  gap: 8px;
  border: 1.5px dashed var(--gris-borde);
  font-size: 0.75rem;
}

.etapa-foto--placeholder small {
  font-size: 0.72rem;
  color: rgba(10, 38, 62, 0.3);
}

.etapa-foto--dark {
  background: linear-gradient(135deg, rgba(10, 38, 62, 0.25) 0%, rgba(10, 38, 62, 0.45) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.18);
}

.etapa-foto--dark small {
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   MATERIALES
   ============================================ */
.materiales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.material-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.material-item:hover {
  background: rgba(255, 165, 6, 0.1);
  border-color: rgba(255, 165, 6, 0.35);
}

.material-item>span {
  font-size: 1.4rem;
  line-height: 1;
}

.material-item strong {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--naranja);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.material-item small {
  font-size: 0.76rem;
  color: var(--gris-texto);
  line-height: 1.4;
}

/* ============================================
   SIDEBAR
   ============================================ */
.proyecto-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 88px - 2rem);
  overflow-y: auto;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Card genérica del sidebar */
.sidebar-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-card__header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 1rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azul);
  border-bottom: 1px solid var(--gris-borde);
  background: var(--fondo);
}

.sidebar-card__header svg {
  opacity: 0.5;
  flex-shrink: 0;
}

/* Galería en sidebar — grilla 3 columnas de miniaturas */
.sidebar-galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0px;
  padding: 0px;
}

.sidebar-thumb {
  aspect-ratio: 1;
  border-radius: 0px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--fondo-alt);
  transition: opacity 0.2s ease;
}

.sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.sidebar-thumb:hover img {
  transform: scale(1.08);
}

.sidebar-thumb:hover {
  opacity: 0.9;
}

.sidebar-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--fondo-alt) 0%, var(--gris-borde) 100%);
  cursor: default;
  border: 1px dashed var(--gris-borde);
}

/* Otros proyectos en sidebar */
.otro-proyecto {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--fondo-alt);
  transition: background 0.2s ease;
  text-decoration: none;
}

.otro-proyecto:last-of-type {
  border-bottom: none;
}

.otro-proyecto:hover {
  background: var(--fondo);
}

.otro-proyecto:hover .otro-proyecto__titulo {
  color: var(--naranja-dark);
}

.otro-proyecto__img {
  width: 80px;
  height: 46px;
  border-radius: 0px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--fondo-alt);
}

.otro-proyecto__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.otro-proyecto__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--fondo-alt) 0%, var(--gris-borde) 100%);
  border: 1px dashed var(--gris-borde);
}

.otro-proyecto__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.otro-proyecto__tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--naranja-dark);
}

.otro-proyecto__titulo {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--azul);
  line-height: 1.35;
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-ver-todos {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--azul-claro);
  padding: 0.75rem;
  border-top: 1px solid var(--gris-borde);
  transition: color 0.2s ease, background 0.2s ease;
  background: var(--fondo);
}

.sidebar-ver-todos:hover {
  color: var(--naranja-dark);
  background: var(--fondo-alt);
}

/* ============================================
   CTA FINAL — ancho completo
   ============================================ */
.proyecto-cta {
  padding: 80px 2rem;
  background: var(--naranja);
}

.proyecto-cta__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.proyecto-cta h2 {
  font-family: var(--fuente-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 1px;
  color: var(--azul);
  margin-bottom: 0.4rem;
  line-height: 1;
}

.proyecto-cta p {
  color: rgba(10, 38, 62, 0.7);
  font-size: 1rem;
}

.proyecto-cta__btns {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-cta--outline {
  background: transparent !important;
  border: 2px solid var(--azul);
  color: var(--azul) !important;
}

.btn-cta--outline:hover {
  background: var(--azul) !important;
  color: var(--blanco) !important;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 38, 62, 0.93);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lb-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lb-img {
  max-width: 88vw;
  max-height: 82vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lb-close:hover {
  background: rgba(255, 165, 6, 0.5);
}

.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lb-arrow:hover {
  background: rgba(255, 165, 6, 0.5);
}

.lb-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.lb-arrow--prev {
  left: 20px;
}

.lb-arrow--next {
  right: 20px;
}

.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo-img {
  height: 36px;
  margin: 0 auto 0.75rem;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-tagline {
  color: rgba(235, 235, 237, 0.6);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(235, 235, 237, 0.7);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--naranja);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(235, 235, 237, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .proyecto-layout {
    grid-template-columns: 1fr;
  }

  .proyecto-sidebar {
    position: static;
    /* En mobile la sidebar baja al final de la columna principal */
  }

  .sidebar-galeria {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .proyecto-layout {
    padding: 0 1.25rem;
  }

  .etapa-galeria {
    grid-template-columns: 1fr 1fr;
  }

  .etapa-foto--grande {
    grid-column: span 2;
  }

  .proyecto-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ficha-chips {
    gap: 0.5rem;
  }

  .chip__valor {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .etapa-galeria {
    grid-template-columns: 1fr;
  }

  .etapa-foto--grande {
    grid-column: span 1;
    height: 210px;
  }

  .etapa-numero {
    font-size: 3.8rem;
  }

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

  .lb-arrow {
    display: none;
  }
}