/* ══════════════════════════════════════════════
   PÁGINA DE TRABAJO INDIVIDUAL — Cristalería Dicor
   Usa las variables y el header/footer de blog.css
══════════════════════════════════════════════ */

/* ── Hero pequeño con breadcrumb ── */
.trabajo-hero {
  background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-icono) 100%);
  padding: 7.5rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}
.trabajo-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.08), transparent 60%);
}
.trabajo-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.trabajo-badges { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.trabajo-badge {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .32rem .9rem;
  border-radius: 20px;
}
.trabajo-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  max-width: 800px;
  margin-bottom: .9rem;
}
.trabajo-meta-row {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}
.trabajo-meta-row span { display: flex; align-items: center; gap: .4rem; }

/* ── Layout principal: contenido + sidebar ── */
.trabajo-layout {
  max-width: 1100px;
  margin: -2rem auto 0;
  padding: 0 2rem 5rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

/* ── Imagen principal ── */
.trabajo-hero-img {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  cursor: zoom-in;
  aspect-ratio: 16/10;
}
.trabajo-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.trabajo-hero-img:hover img { transform: scale(1.03); }

/* ── Contenido de texto ── */
.trabajo-content {
  background: var(--blanco);
  border-radius: 14px;
  padding: 2.4rem;
  margin-top: 1.6rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.trabajo-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--negro);
  margin: 1.8rem 0 .8rem;
  display: flex; align-items: center; gap: .5rem;
}
.trabajo-content h2:first-child { margin-top: 0; }
.trabajo-content p {
  color: #555; line-height: 1.85; font-size: 1rem; margin-bottom: 1rem;
}
.trabajo-content ul { margin: 0 0 1rem 0; padding-left: 1.3rem; }
.trabajo-content ul li { color: #555; line-height: 1.8; margin-bottom: .4rem; }

/* ── Tags ── */
.trabajo-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.6rem 0 0; }
.trabajo-tag {
  background: var(--gris);
  color: var(--azul-oscuro);
  font-family: 'Montserrat', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  padding: .35rem .9rem;
  border-radius: 20px;
}

/* ── Galería ── */
.trabajo-gallery-section { margin-top: 1.6rem; }
.trabajo-gallery-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--negro);
  margin-bottom: 1rem;
}
.trabajo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.trabajo-gallery figure {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: zoom-in;
  position: relative;
}
.trabajo-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s, opacity .2s; }
.trabajo-gallery figure:hover img { transform: scale(1.06); }
.trabajo-gallery figure::after {
  content: '🔍';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,95,160,0);
  color: transparent;
  font-size: 1.4rem;
  transition: background .25s, color .25s;
}
.trabajo-gallery figure:hover::after { background: rgba(30,95,160,.35); color: #fff; }

/* ── Sidebar ── */
.trabajo-sidebar { display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 6.5rem; }
.sidebar-card {
  background: var(--blanco);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.sidebar-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--negro);
  margin-bottom: 1rem;
}
.specs-list { list-style: none; }
.specs-list li {
  display: flex; justify-content: space-between; gap: .6rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--gris);
  font-size: .86rem;
}
.specs-list li:last-child { border-bottom: none; }
.specs-list .spec-label { color: #888; font-weight: 600; }
.specs-list .spec-value { color: var(--negro); font-weight: 700; text-align: right; }

.sidebar-cta {
  background: linear-gradient(135deg, var(--azul-oscuro), var(--azul-icono));
  color: #fff;
  text-align: center;
}
.sidebar-cta h3 { color: #fff; }
.sidebar-cta p { color: rgba(255,255,255,.85); font-size: .88rem; margin-bottom: 1.1rem; line-height: 1.55; }
.sidebar-cta-btn {
  display: block;
  background: #fff;
  color: var(--azul-oscuro);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: .88rem;
  padding: .8rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  margin-bottom: .6rem;
  transition: transform .2s, box-shadow .2s;
}
.sidebar-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.sidebar-cta-btn.whatsapp { background: #25d366; color: #fff; }

.sidebar-back {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--azul-oscuro);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .86rem;
  text-decoration: none;
}
.sidebar-back:hover { text-decoration: underline; }

/* ── Trabajos relacionados ── */
.relacionados {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}
.relacionados h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--negro);
  margin-bottom: 1.4rem;
}
.relacionados-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.relacionado-card {
  background: var(--blanco);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  text-decoration: none;
  display: block;
  transition: transform .25s, box-shadow .25s;
}
.relacionado-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.14); }
.relacionado-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.relacionado-card-body { padding: 1rem 1.2rem; }
.relacionado-card-cat {
  color: var(--azul-oscuro);
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.relacionado-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--negro);
  margin-top: .35rem;
  line-height: 1.4;
}

/* ══════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════ */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 5000;
  background: rgba(10,10,15,.96);
  align-items: center; justify-content: center;
  padding: 2rem;
}
#lightbox.open { display: flex; animation: ckFadeIn .25s ease both; }
@keyframes ckFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-inner { position: relative; max-width: 1200px; width: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox-img-wrap { max-width: 100%; max-height: 86vh; display: flex; align-items: center; justify-content: center; }
#lightbox img {
  max-width: 100%; max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: scaleIn .25s ease both;
}

.lightbox-close {
  position: absolute; top: -3rem; right: 0;
  background: rgba(255,255,255,.12);
  border: none; color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); transform: rotate(90deg); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none; color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-prev { left: -1rem; }
.lightbox-next { right: -1rem; }

.lightbox-counter {
  position: absolute; bottom: -2.6rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75);
  font-family: 'Montserrat', sans-serif;
  font-size: .84rem;
  font-weight: 600;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .trabajo-layout { grid-template-columns: 1fr; margin-top: -1.4rem; }
  .trabajo-sidebar { position: static; }
  .relacionados-grid { grid-template-columns: 1fr; }
  .trabajo-gallery { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev { left: .3rem; }
  .lightbox-next { right: .3rem; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.3rem; }
  .lightbox-close { top: .5rem; right: .5rem; }
}
@media (max-width: 600px) {
  .trabajo-hero { padding: 6.5rem 1.2rem 2.4rem; }
  .trabajo-content { padding: 1.6rem; }
  .trabajo-gallery { grid-template-columns: repeat(2, 1fr); }
}
