/* ============================================================
   BAMBOO INTERIORISMO INTEGRAL — proyectos.css
   Estilos exclusivos de la página de proyectos.
   Requiere: base.css, components.css
============================================================ */

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(rgba(28,28,26,0.72), rgba(28,28,26,0.72)),
    url('../assets/img/proyectos-hero.jpeg') center/cover no-repeat;;
  padding: 11rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(184,148,90,0.3), transparent);
}
.page-header-texture {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23B8945A' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header-content { position: relative; z-index: 2; text-align: center; }

/* Eyebrow del hero — sin línea lateral, solo el texto */
.page-eyebrow {
  justify-content: center;
}
.page-eyebrow::before {
  display: none;
}
.page-eyebrow span  { color: var(--gold-light); letter-spacing: 0.4em; }

.page-header .section-title { color: var(--cream); margin-bottom: 1.5rem; }
.page-header .section-title em { color: var(--gold-light); }
.page-header-sub {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 300;
  color: var(--stone-light); letter-spacing: 0.04em; line-height: 1.9;
  max-width: 500px; margin: 0 auto;
}

/* ── GRID DE PROYECTOS ── */
.proyectos-section { padding: 4rem 0 8rem; background: var(--ivory); }

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(184,148,90,0.12);
}

/* Tarjeta base */
.proy-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--charcoal-soft);
}

.proy-img {
  width: 100%; height: 330px; display: block;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
  filter: brightness(0.7) sepia(0.12);
}
.proy-card:hover .proy-img {
  transform: scale(1.06);
  filter: brightness(0.85) sepia(0.05);
}

/* Imágenes reales por proyecto — aplica tanto a card como a lightbox */
.proy-img.cocina,        .lightbox-img.cocina        { background: url('../assets/img/1.png')  center/cover no-repeat; }
.proy-img.closet,        .lightbox-img.closet        { background: url('../assets/img/4.png')  center/cover no-repeat; }
.proy-img.comercial,     .lightbox-img.comercial     { background: url('../assets/img/7.png')  center/cover no-repeat; }
.proy-img.muestra,       .lightbox-img.muestra       { background: url('../assets/img/5.png')  center/cover no-repeat; }
.proy-img.paisa,         .lightbox-img.paisa         { background: url('../assets/img/9.png')  center/cover no-repeat; }
.proy-img.closet-alt,    .lightbox-img.closet-alt    { background: url('../assets/img/2.png')  center/cover no-repeat; }
.proy-img.cocina-alt,    .lightbox-img.cocina-alt    { background: url('../assets/img/10.png') center/cover no-repeat; }
.proy-img.muestra-alt,   .lightbox-img.muestra-alt   { background: url('../assets/img/8.png')  center/cover no-repeat; }
.proy-img.cancel,        .lightbox-img.cancel        { background: url('../assets/img/11.png') center/cover no-repeat; }
.proy-img.comercial-alt, .lightbox-img.comercial-alt { background: url('../assets/img/12.png') center/cover no-repeat; }
.proy-img.paisa-alt,     .lightbox-img.paisa-alt     { background: url('../assets/img/13.png') center/cover no-repeat; }
.proy-img.cancel-alt,    .lightbox-img.cancel-alt    { background: url('../assets/img/14.png') center/cover no-repeat; }
.proy-img.magnolias,     .lightbox-img.magnolias     { background: url('../assets/img/15.png') center/cover no-repeat; }
.proy-img.carr-nacional, .lightbox-img.carr-nacional { background: url('../assets/img/16.png') center/cover no-repeat; }

/* Overlay de la tarjeta */
.proy-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,28,26,0.88) 0%, rgba(28,28,26,0.1) 55%, transparent 75%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.75rem;
  transition: background 0.4s;
}
.proy-card:hover .proy-overlay {
  background: linear-gradient(to top, rgba(28,28,26,0.96) 0%, rgba(28,28,26,0.35) 60%, transparent 85%);
}

.proy-tag {
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.45rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.proy-tag::before { content: ''; width: 14px; height: 1px; background: var(--gold); flex-shrink: 0; }

.proy-name {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 400;
  color: var(--cream); line-height: 1.2; margin-bottom: 0.4rem;
}
.proy-meta {
  font-size: 0.62rem; color: var(--stone-light); font-weight: 300; letter-spacing: 0.08em;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.proy-card:hover .proy-meta { opacity: 1; transform: translateY(0); }

/* Icono → */
.proy-cta {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 34px; height: 34px; border: 1px solid rgba(184,148,90,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}
.proy-card:hover .proy-cta { opacity: 1; transform: scale(1); }
.proy-cta svg { width: 13px; height: 13px; stroke: var(--gold); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Tarjeta destacada — 2 columnas */
.proy-card.featured               { grid-column: span 2; }
.proy-card.featured .proy-img     { height: 480px; }
.proy-card.featured .proy-name    { font-size: 1.9rem; }

/* ── LIGHTBOX ── */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 1500;
  background: rgba(10,10,9,0.96); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 1.5rem;
}
.lightbox-overlay.active { display: flex; }

.lightbox-inner {
  width: 100%; max-width: 860px; position: relative;
  animation: lbIn 0.42s cubic-bezier(0.16,1,0.3,1);
  max-height: 92vh; display: flex; flex-direction: column;
}
@keyframes lbIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close button — esquina superior derecha del overlay */
.lightbox-close {
  position: fixed; top: 1.5rem; right: 1.75rem; z-index: 10;
  background: rgba(28,28,26,0.6); border: 1px solid rgba(184,148,90,0.25);
  cursor: pointer; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s, border-color 0.25s;
}
.lightbox-close:hover { background: rgba(184,148,90,0.15); border-color: var(--gold); }
.lightbox-close svg {
  width: 16px; height: 16px; stroke: var(--stone-light); fill: none;
  stroke-width: 1.5; stroke-linecap: round; transition: stroke 0.2s;
}
.lightbox-close:hover svg { stroke: var(--cream); }

/* Área de imagen */
.lightbox-img-wrap { flex: 1; overflow: hidden; }
.lightbox-img {
  width: 100%; height: 55vh; max-height: 480px; display: block;
}

/* Barra de info */
.lightbox-info {
  background: var(--charcoal);
  border-top: 1px solid rgba(184,148,90,0.2);
  padding: 1.75rem 2.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  flex-shrink: 0;
}
.lightbox-info-left { flex: 1; min-width: 0; }

.lightbox-tag {
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.lightbox-tag::before { content: ''; width: 18px; height: 1px; background: var(--gold); flex-shrink: 0; }

.lightbox-name {
  font-family: var(--serif); font-size: 1.7rem; font-weight: 300;
  color: var(--cream); line-height: 1.15; margin-bottom: 0.35rem;
}
.lightbox-meta {
  font-size: 0.68rem; color: var(--stone-light); font-weight: 300; letter-spacing: 0.1em;
}

.lightbox-cta {
  flex-shrink: 0; font-size: 0.6rem; padding: 0.9rem 1.75rem;
  white-space: nowrap;
}

/* Click en fondo cierra el lightbox */
.lightbox-overlay.active { cursor: default; }

/* ── RESPONSIVE PROYECTOS ── */
@media (max-width: 1024px) and (min-width: 769px) {
  .proyectos-grid { grid-template-columns: repeat(2, 1fr); }
  .proy-card.featured { grid-column: span 2; }
}

@media (max-width: 768px) {
  .page-header { padding: 8rem 0 4rem; }
  .page-header .section-title { font-size: clamp(1.8rem,6vw,2.5rem); }

  .proyectos-section { padding: 3rem 0 5rem; }
  .proyectos-grid { grid-template-columns: 1fr; }
  .proy-card.featured { grid-column: span 1; }
  .proy-card.featured .proy-img { height: 320px; }
  .proy-card.featured .proy-name { font-size: 1.5rem; }
  .proy-img { height: 260px; }
  .proy-meta { opacity: 1; transform: translateY(0); }
  .proy-cta  { opacity: 1; transform: scale(1); }

  .lightbox-inner { max-width: 100%; }
  .lightbox-img { height: 38vh; }
  .lightbox-info { flex-direction: column; align-items: flex-start; gap: 1.25rem; padding: 1.25rem 1.5rem; }
  .lightbox-name { font-size: 1.3rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
}
