/* ══════════════════════════════════════════════════════
   LOVIT — work.css v3
══════════════════════════════════════════════════════ */

/* ── Nav sobre fondo blanco ──────────────────────────── */
.nav--light .nav__link        { color: var(--black); }
.nav--light .nav__link::after { background: var(--blue); }
.nav--light .nav__link.active { color: var(--blue); }
.nav--light .nav__burger span { background: var(--black); }
.nav--light .nav__cta {
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue);
}
.nav--light .nav__cta:hover {
  background: var(--blue);
  color: var(--white);
}

/* ── Hero eyebrow centrado ───────────────────────────── */
.work-hero {
  padding: calc(var(--nav-h) + 80px) 28px 48px;
  text-align: center;
  border-bottom: none;
}
.work-hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

/* ── 3 botones filtro — max 1200px centrado ──────────── */
.work-filtros {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 0;
  gap: 0;
}

.filtro-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 20px;
  background: transparent;
  border: 0.5px solid rgba(0,0,0,0.12);
  cursor: none;
  font-family: var(--font);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.filtro-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  z-index: 0;
}
.filtro-btn:hover::before,
.filtro-btn--active::before {
  transform: translateY(0);
}

.filtro-btn__label,
.filtro-btn__count { position: relative; z-index: 1; }

.filtro-btn__label {
  font-size: clamp(11px, 1.2vw, 17px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--black);
  transition: color 0.3s var(--ease);
}
.filtro-btn__count {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--gray);
  transition: color 0.3s var(--ease);
}
.filtro-btn:hover .filtro-btn__label,
.filtro-btn--active .filtro-btn__label { color: var(--white); }
.filtro-btn:hover .filtro-btn__count,
.filtro-btn--active .filtro-btn__count { color: rgba(255,255,255,0.6); }

/* ── Grilla proyectos ─────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 0;
  transition: opacity 0.3s ease;
}

/* ── Animación de entrada — fade + scale diagonal ──────── */
.work-item.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition:
    opacity  0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-item.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.work-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  cursor: none;
  display: block;
}
.work-item__bg {
  position: absolute;
  inset: 0;
  background: var(--gray-lt) center/cover no-repeat;
  transition: transform 0.7s var(--ease);
}
.work-item:hover .work-item__bg { transform: scale(1.05); }

.work-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,255,0);
  transition: background 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.work-item:hover .work-item__overlay { background: rgba(0,0,255,0.82); }

.work-item__cat {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0);
  margin-bottom: 6px;
  transition: color 0.3s var(--ease);
}
.work-item__title {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0);
  line-height: 1.2;
  transition: color 0.3s var(--ease);
}
.work-item__client {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0);
  margin-top: 4px;
  transition: color 0.3s var(--ease);
}
.work-item:hover .work-item__cat    { color: rgba(255,255,255,0.65); }
.work-item:hover .work-item__title  { color: var(--white); }
.work-item:hover .work-item__client { color: rgba(255,255,255,0.6); }

/* Item oculto por filtro */
.work-item.hidden { display: none; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .filtro-btn { padding: 16px 12px; }
}
@media (max-width: 600px) {
  .work-filtros { flex-direction: column; padding: 32px 28px 32px; }
  .work-grid { grid-template-columns: 1fr; }
  .filtro-btn { flex-direction: row; justify-content: space-between; padding: 20px 16px; }
}

/* ── Mobile: sin overlay azul permanente ─────────────── */
@media (hover: none) {
  .work-item__overlay { background: rgba(0,0,255,0) !important; }
  .work-item__cat     { color: rgba(255,255,255,0) !important; }
  .work-item__title   { color: rgba(255,255,255,0) !important; }
  .work-item__client  { color: rgba(255,255,255,0) !important; }
  .work-item__bg      { transform: none !important; }
}
