/* ================================
   SECTION PORTFOLIO
================================ */

.section-portfolio {
  position: relative;
  overflow: hidden;

  background-color: var(--color8);

  padding: 4rem 2rem;

  scroll-margin-top: 100px;
}


/* ================================
   ENCABEZADO
================================ */

.section-portfolio h5 {
  text-align: center;

  color: var(--color2);

  letter-spacing: 0.5px;

  font-size: 0.9rem;

  margin-bottom: 0.5rem;
}

.section-portfolio h1 {
  font-family: "Poppins", sans-serif;

  text-align: center;

  color: var(--color1);

  font-size: 1.8rem;

  line-height: 1.3;

  margin-bottom: 1rem;
}

.section-portfolio .frase {
  text-align: center;

  color: var(--color3);

  font-size: 1rem;

  max-width: 900px;

  margin: 0 auto 3rem;

  line-height: 1.6;
}


/* ================================
   CATEGORÍAS
================================ */

.categoria-portfolio {
  position: relative;
}

.categoria-portfolio + .categoria-portfolio {
  margin-top: 1rem;
}


/* ================================
   CONTENEDOR DE PROYECTOS
================================ */

.section-portfolio-content {
  display: flex;

  flex-direction: column;

  gap: 2rem;

  max-width: 1200px;

  margin: 0 auto;
}


/* ================================
   TARJETAS
================================ */

.proyecto {
  position: relative;

  background-color: var(--color15);

  border: none;

  border-radius: 0.75rem;

  overflow: hidden;

  width: 100%;

  display: flex;

  flex-direction: column;

  box-shadow: 0 8px 18px rgba(47, 28, 106, 0.10);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.proyecto:hover {
  transform: translateY(-6px);

  box-shadow: 0 14px 28px rgba(47, 28, 106, 0.16);
}


/* ================================
   NUMERACIÓN DECORATIVA
================================ */

.proyecto::after {
  position: absolute;

  right: 1rem;
  bottom: 0.6rem;

  font-family: "Poppins", sans-serif;

  font-size: 3.6rem;

  line-height: 1;

  font-weight: 700;

  color: rgba(255, 255, 255, 0.06);

  pointer-events: none;

  z-index: 1;
}

.section-portfolio-content .proyecto:nth-child(1)::after {
  content: "01";
}

.section-portfolio-content .proyecto:nth-child(2)::after {
  content: "02";
}


/* ================================
   VIDEO / IMAGEN
================================ */

.video-proyectos,
.proyecto-thumbnail {
  position: relative;

  width: 100%;

  overflow: hidden;

  border-radius: 0.75rem 0.75rem 0 0;

  aspect-ratio: 16 / 9;
}

.video-proyectos video,
.proyecto-thumbnail img {
  width: 100%;

  height: 100%;

  object-fit: cover;

  filter: grayscale(100%);

  transform: scale(1);

  transition:
    filter 0.4s ease,
    transform 0.5s ease;
}


/* Hover solo en dispositivos con mouse */
@media (hover: hover) and (pointer: fine) {

  .proyecto:hover .video-proyectos video,
  .proyecto:hover .proyecto-thumbnail img {
    filter: grayscale(0%);

    transform: scale(1.035);
  }

}


/* ================================
   INFO DEL PROYECTO
================================ */

.content-info {
  position: relative;

  z-index: 2;

  padding: 1.4rem 1.3rem 1.6rem;
}

.content-info a {
  display: block;

  margin: 0 0 1rem;

  font-size: 1.2rem;

  line-height: 1.35;

  color: var(--color11);

  font-weight: 600;

  text-decoration: none;

  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);

  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.content-info a:hover {
  color: var(--color10);
}

.content-info h4 {
  color: var(--color11);

  font-size: 1rem;

  line-height: 1.5;

  margin: 0.5rem 0 1rem;
}

.content-info p {
  color: var(--color11);

  font-size: 0.9rem;

  line-height: 1.6;

  margin: 0;
}


/* ================================
   BOTÓN FINAL
================================ */

.content-button {
  display: flex;

  justify-content: center;

  margin-top: 2rem;
}

.content-button a {
  display: inline-block;

  min-width: 300px;

  padding: 0.8rem 1.5rem;

  margin-bottom: 2rem;

  background-color: var(--color2);

  color: var(--color11);

  border-radius: 8px;

  text-decoration: none;

  text-align: center;

  font-weight: 600;

  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.content-button a:hover {
  background-color: var(--color14);

  transform: translateY(-2px);
}


/* ================================
   TABLET
================================ */

@media screen and (min-width: 768px) {

  .section-portfolio h5 {
    font-size: 1rem;
  }

  .section-portfolio h1 {
    font-size: 2.2rem;
  }

  .section-portfolio .frase {
    font-size: 1.1rem;
  }

  .section-portfolio-content {
    flex-direction: row;

    flex-wrap: wrap;

    justify-content: center;

    gap: 2rem;
  }

  .proyecto {
    flex: 1 1 45%;

    max-width: 45%;
  }

  .proyecto::after {
    right: 1.2rem;

    bottom: 0.6rem;

    font-size: 4.2rem;
  }

  .content-info {
    padding: 1.5rem;
  }

  .content-info a {
    font-size: 1.3rem;
  }

  .content-info h4 {
    font-size: 1.1rem;
  }

  .content-info p {
    font-size: 1rem;

    line-height: 1.65;
  }

}


/* ================================
   DESKTOP
================================ */

@media screen and (min-width: 1024px) {

  .section-portfolio {
    padding: 5rem 2rem;
  }

  .section-portfolio h5 {
    font-size: 1.1rem;
  }

  .section-portfolio h1 {
    font-size: 2.8rem;

    margin: 1rem 0;
  }

  .section-portfolio .frase {
    font-size: 1.2rem;

    margin-bottom: 3.5rem;
  }

  .section-portfolio-content {
    padding: 2rem;

    gap: 2rem;
  }

  .proyecto {
    max-width: 48%;
  }

  .proyecto::after {
    right: 1.5rem;

    bottom: 0.7rem;

    font-size: 5rem;
  }

  .content-info {
    padding: 1.6rem 1.6rem 1.8rem;
  }

  .content-info a {
    font-size: 1.5rem;
  }

  .content-info h4 {
    font-size: 1.2rem;
  }

  .content-info p {
    font-size: 1.1rem;

    line-height: 1.7;
  }

}