/* ======================================
AJAX 
========================================*/

.portfolio-grid {
  background-color: #1a1c1e;
  border-top: 1px solid #2a2a2b;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: clamp(40px, 6vw, 110px) clamp(24px, 4vw, 70px);
  padding: 8vw 10vw 12vh;
  align-items: start;
}

/* CAJA GENERAL DE CADA PROYECTO */

.box_ajax {
  position: relative;
  display: block;
}

/* POSICIONES INDIVIDUALES */

.box_ajax:nth-child(1) {
  grid-column: 1 / span 8;
}

.box_ajax:nth-child(1) .project-item {
  height: 800px;
}

.box_ajax:nth-child(2) {
  grid-column: 10 / span 5;
  margin-top: 230px;
}

.box_ajax:nth-child(2) .project-item {
  height: 350px;
}

.box_ajax:nth-child(3) {
  grid-column: 3 / span 10;
  margin-top: 0;
}

.box_ajax:nth-child(3) .project-item {
  height: 500px;
}

.box_ajax:nth-child(4) {
  grid-column: 1 / span 4;
  margin-top: 300px;
}

.box_ajax:nth-child(4) .project-item {
  height: 300px;
}

.box_ajax:nth-child(5) {
  grid-column: 6 / span 9;
  margin-top: 40px;
}

.box_ajax:nth-child(5) .project-item {
  height: 800px;
}

.box_ajax:nth-child(6) {
  grid-column: 1 / span 14;
  margin-top: 40px;
}

.box_ajax:nth-child(6) .project-item {
  height: 500px;
}

/* CONTENEDOR DE IMAGEN */

.project-item {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1b1c1d;
}

/* ENLACE / CARD */

.project-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: white;
  text-decoration: none;
  background: #111;
  isolation: isolate;
}

/* IMAGEN */

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  filter: brightness(.72);

  transform: scale(1.130);
  transform-origin: center center;

  transition:
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter .75s ease;

  will-change: transform, filter;
  backface-visibility: hidden;
}

/* HOVER */

.project-card:hover img {
  transform: scale(1.07);
  filter: brightness(.9);
}

/* OVERLAY OSCURO */

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent 60%);
  pointer-events: none;
}

/* ===================================================== */
/* PROJECT INFO */
/* ===================================================== */

.project-info {
  position: relative;
  width: 100%;
  margin-top: 14px;
  z-index: 2;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

/* IZQUIERDA */

/* IZQUIERDA */

.project-title-line {
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
}

/* FLECHA */

.project-arrow {
  position: absolute;
  left: 0;
  top: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 40px;
  line-height: 1;
  color: #aaa;

  opacity: 0;
  transform: translate(-26px, -50%) scale(.65) rotate(-8deg);
  transform-origin: center;

  pointer-events: none;

  transition:
    opacity .35s ease,
    transform .95s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-arrow img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

/* TITULO */

.project-title-line h2 {
  margin: 0;
  padding: 0;

  font-size: 35px;
  line-height: 50px;
  font-weight: 500;
  color: #aaaaaa;

  transform: translateX(0);

  transition:
    transform .85s cubic-bezier(0.16, 1, 0.3, 1),
    color .45s ease;
}

/* HOVER IZQUIERDA */

.box_ajax:hover .project-arrow {
  opacity: 1;
  transform: translate(0, -50%) scale(1) rotate(0deg);
}

.box_ajax:hover .project-title-line h2 {
  transform: translateX(46px);
  color: #d0d0d0;
}

/* DERECHA */

.project-category {
  position: relative;
  top: 15px;
  height: 22px;
  min-width: 160px;
  overflow: hidden;
  text-align: right;
}

.project-category span {
  position: absolute;
  top: 0;
  right: 0;

  display: block;
  width: 100%;

  font-size: 14px;
  line-height: 22px;
  text-transform: uppercase;
  text-align: right;

  transition:
    transform .75s cubic-bezier(0.16, 1, 0.3, 1),
    opacity .45s ease;
}

.category-default {
  font-weight: 300;
  color: #F3BC44;
  transform: translateY(0);
  letter-spacing: 1px;
  opacity: 1;
}

.category-hover {
  font-weight: 300;
  color: #F3BC44;
  transform: translateY(100%);
  letter-spacing: 1px;
  opacity: 0;
}

.box_ajax:hover .category-default {
  transform: translateY(-100%);
  opacity: 0;
}

.box_ajax:hover .category-hover {
  transform: translateY(0);
  opacity: 1;
}

/* ====================================== */

/* TRANSICIÓN AJAX */

.transition-frame {
  position: fixed;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
  background: #111;
  will-change: top, left, width, height, opacity;
}

.transition-frame img {
  will-change: transform, filter;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.project-card.is-active-card {
  pointer-events: none;
}

.transition-mask {
  position: fixed;
  inset: 0;
  background: #070707;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
}

/* HERO PROYECTO */

.project-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 5vw 10vh;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.48);
  transform: scale(1.02);
  transform-origin: center center;
  z-index: 0;
}

.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(7, 7, 7, .9), rgba(7, 7, 7, .14), transparent);
}

/* ========================================
Esto es para la parte del video cargado
========================================= */
.video-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.video-wrapper video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;

  display: block;
}

.project-hero-content {
  position: relative;
  z-index: 2;
}

/* ====================================== */

/* RESPONSIVE */

@media (max-width: 780px) {

  .portfolio-grid,
  .project-intro,
  .project-gallery {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    gap: 90px;
    padding: 80px 24px;
  }

  .box_ajax:nth-child(n) {
    grid-column: auto;
    margin-top: 0;
  }

  .box_ajax:nth-child(n) .project-item {
    height: 58vh;
  }

  .project-gallery img {
    height: 58vh;
  }

  .site-header {
    padding: 22px 6vw;
  }

  .nav {
    gap: 16px;
  }
}

/* ===============================
//AJAX 
=================================*/