/* ===========================
   PROYECTOS — estilos específicos
=========================== */

/* Hero */
.proj-hero {
  padding-top: var(--nav-h);
  background: var(--black);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.proj-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255,255,255,.018) 59px, rgba(255,255,255,.018) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,255,255,.018) 59px, rgba(255,255,255,.018) 60px);
  pointer-events: none;
}
.proj-hero__content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 40px 72px;
  position: relative;
  z-index: 1;
}
.proj-hero__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 24px;
}
.proj-hero__title {
  font-family: var(--font-title);
  font-size: clamp(52px, 12vw, 140px);
  line-height: .9;
  color: var(--white);
  margin-bottom: 28px;
}
.proj-hero__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.45);
  max-width: 560px;
  line-height: 1.75;
}

/* Nav active link */
.nav__link--active {
  color: var(--white) !important;
  border-bottom: 1px solid rgba(255,255,255,.3);
  padding-bottom: 2px;
}

/* Filtros */
.filters {
  background: var(--dark);
  border-bottom: 1px solid var(--border);
}
.filters__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters__inner::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 18px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  cursor: pointer;
  transition: color .18s ease-out, border-color .18s ease-out;
}
.filter-btn:active { transform: scale(0.97); }
.filter-btn--active {
  color: var(--white);
  border-bottom-color: var(--white);
}
@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover { color: rgba(255,255,255,.7); }
}

/* Grid */
.proj-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 0;
}

/* Cards */
.proj-card {
  background: var(--dark);
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: none;
  transition: background var(--transition), opacity .3s ease, transform .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .proj-card:hover { background: var(--surface); }
}


.proj-card.hidden {
  display: none;
}

.proj-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.proj-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .proj-card:hover .proj-card__img img { transform: scale(1.04); }
}

/* Placeholder cuando no hay foto */
.proj-card__img--placeholder {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.proj-card__placeholder-icon {
  font-size: 3rem;
  opacity: .18;
}

.proj-card__info {
  padding: 28px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.proj-card__cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
}
.proj-card__info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}
.proj-card__location {
  font-size: .82rem;
  color: rgba(255,255,255,.3);
  font-weight: 500;
}
.proj-card__desc {
  font-size: .88rem;
  color: rgba(255,255,255,.4);
  line-height: 1.7;
  margin-top: 4px;
}
.proj-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.proj-card__tags span {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: rgba(255,255,255,.25);
}

/* Sin resultados */
.proj-grid__empty {
  grid-column: 1 / -1;
  padding: 80px 40px;
  text-align: center;
  display: none;
}
.proj-grid__empty.visible { display: block; }
.proj-grid__empty p {
  font-size: 1rem;
  color: rgba(255,255,255,.25);
}

/* CTA final */
.proj-cta {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 100px 40px;
}
.proj-cta__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.proj-cta h2 {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 52px);
  color: var(--white);
  line-height: 1.05;
}
.proj-cta p {
  color: rgba(255,255,255,.4);
  font-size: .95rem;
  margin-bottom: 12px;
}

/* Hover overlay en cards */
.proj-card { cursor: pointer; }
.proj-card__img::after {
  content: 'Ver galería →';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .proj-card:hover .proj-card__img::after { opacity: 1; }
}

/* ===========================
   LIGHTBOX
=========================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox--open {
  opacity: 1;
  pointer-events: all;
}
.lightbox__img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 80px 100px 100px;
  box-sizing: border-box;
}
.lightbox__img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  transition: opacity .18s ease;
  border: 1px solid rgba(255,255,255,.07);
}
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease-out, color .18s ease-out;
  z-index: 901;
  line-height: 1;
}
.lightbox__close:active { transform: scale(0.93); }
@media (hover: hover) and (pointer: fine) {
  .lightbox__close:hover { background: rgba(255,255,255,.16); color: #fff; }
}
.lightbox__prev,
.lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.65);
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease-out, color .18s ease-out, transform .1s ease-out;
  z-index: 901;
  line-height: 1;
  padding-bottom: 2px;
}
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__prev:active { transform: translateY(-50%) scale(0.93); }
.lightbox__next:active { transform: translateY(-50%) scale(0.93); }
@media (hover: hover) and (pointer: fine) {
  .lightbox__prev:hover,
  .lightbox__next:hover { background: rgba(255,255,255,.14); color: #fff; }
}
.lightbox__prev:disabled,
.lightbox__next:disabled { opacity: 0; pointer-events: none; }
.lightbox__info {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 901;
  white-space: nowrap;
}
.lightbox__title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin: 0 0 4px;
}
.lightbox__counter {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .1em;
  margin: 0;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); padding: 48px 24px 80px; }
}

@media (max-width: 768px) {
  .proj-hero__content { padding: 60px 24px 56px; }
  .filters__inner      { padding: 0 24px; }
  .proj-grid {
    grid-template-columns: 1fr;
    padding: 32px 24px 64px;
    margin: 0;
    border-left: none;
    border-right: none;
  }
  .proj-cta { padding: 72px 24px; }
  .lightbox__img-wrap { padding: 60px 12px 72px; }
  /* Reducir padding interno de cards en móvil */
  .proj-card__info { padding: 20px 20px 28px; }
}

@media (max-width: 480px) {
  .lightbox__img-wrap { padding: 56px 8px 68px; }
  .proj-hero__content { padding: 48px 16px 40px; }
  .filters__inner     { padding: 0 16px; }
  .proj-grid          { padding: 24px 16px 48px; }
  .proj-cta           { padding: 56px 16px; }
}

/* ===========================
   ANIMACIONES ENTRADA — Emil Kowalski
=========================== */
@keyframes projFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.proj-hero__label {
  animation: projFadeUp .5s cubic-bezier(0.23, 1, 0.32, 1) .05s both;
}
.proj-hero__title {
  animation: projFadeUp .6s cubic-bezier(0.23, 1, 0.32, 1) .15s both;
}
.proj-hero__sub {
  animation: projFadeUp .5s cubic-bezier(0.23, 1, 0.32, 1) .26s both;
}

/* ===========================
   REDUCED MOTION
=========================== */
@media (prefers-reduced-motion: reduce) {
  .proj-hero__label,
  .proj-hero__title,
  .proj-hero__sub {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .proj-card__img img {
    transition: none;
  }
}
