/* ========================================
   PROYECTOS
   MOBILE FIRST
======================================== */

.section-proyectos {
  width: 100%;
  box-sizing: border-box;

  background-color: var(--color1);

  padding: 4rem 1.25rem;

  scroll-margin-top: 100px;
}


/* ========================================
   TÍTULO PRINCIPAL
======================================== */

.section-proyectos > h2 {
  margin: 0;
  padding-bottom: 2rem;

  color: var(--color2);

  font-size: var(--font-lg);
  font-weight: 700;
  text-align: center;
}


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

.categoria-proyectos {
  width: 100%;
}


/* BANDA DE CADA CATEGORÍA */

.subtitulo-proyectos {
  width: calc(100% + 2.5rem);
  box-sizing: border-box;

  margin: 2.5rem -1.25rem 2rem;
  padding: 1rem 1.25rem;

  background-color: var(--color13);

  color: var(--color2);

  font-size: var(--font-md);
  font-weight: 700;
  line-height: 1.3;

  text-align: center;
  text-transform: uppercase;
}


/* ========================================
   GRILLA DE PROYECTOS
======================================== */

.section-proyectos-content {
  width: 100%;
  max-width: 1200px;

  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr;

  gap: 2rem;
}


/* ========================================
   CARD
======================================== */

.proyecto {
  width: 100%;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  background-color: var(--color14);

  border-radius: 8px;
  overflow: hidden;
}


/* ========================================
   VIDEOS
======================================== */

.video-proyectos {
  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background-color: var(--color3);
}

.video-proyectos video {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter: grayscale(100%);

  transition: filter 0.3s ease;
}

.video-proyectos video:hover {
  filter: grayscale(0%);
}


/* ========================================
   IMÁGENES DE PROYECTOS
======================================== */

.proyecto-thumbnail {
  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background-color: var(--color3);
}

.proyecto-thumbnail img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter: grayscale(100%);

  transition: filter 0.3s ease;
}

.proyecto-thumbnail img:hover {
  filter: grayscale(0%);
}


/* ========================================
   CONTENIDO DE LA CARD
======================================== */

.content-info {
  flex: 1;

  display: flex;
  flex-direction: column;

  box-sizing: border-box;

  padding: 1rem;
}


/* TÍTULO DEL PROYECTO */

.content-info > a {
  display: inline-block;

  margin-bottom: 1rem;

  color: var(--color2);

  font-size: var(--font-md);
  font-weight: 700;
  line-height: 1.3;

  text-decoration: none;

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

  transition: color 0.3s ease;
}

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


/* DESCRIPCIÓN CORTA / ROL */

.content-info h4 {
  margin: 0 0 1rem;

  color: var(--color2);

  font-size: var(--font-sm);
  font-weight: 700;
  line-height: 1.45;

  text-align: left;
}


/* TEXTO PRINCIPAL */

.content-info p {
  margin: 0 0 1.25rem;

  color: var(--color2);

  font-size: var(--font-sm);
  line-height: 1.55;

  text-align: left;
}


/* ========================================
   TAGS
======================================== */

.tags {
  display: flex;
  flex-wrap: wrap;

  gap: 0.5rem;

  /*
   Empuja los tags al final.
   Esto hace que queden alineados entre cards
   aunque los textos tengan distinta longitud.
  */
  margin-top: auto;
}

.content-info .tags span {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 5px 10px;

  background-color: var(--color7);

  border: 1px solid var(--color7);
  border-radius: 8px;

  color: var(--color3);

  font-size: var(--font-xs);
  font-weight: 500;

  line-height: 1.2;
}


/* ========================================
   BOTONES "VER MÁS"
======================================== */

.content-button {
  width: 100%;

  display: flex;
  justify-content: center;

  margin-top: 2rem;
}

.content-button a {
  min-width: 210px;

  box-sizing: border-box;

  padding: 0.75rem 1.25rem;

  background-color: var(--color6);

  border-radius: 8px;

  color: var(--color2);

  font-size: var(--font-sm);
  font-weight: 700;

  text-align: center;
  text-decoration: none;

  transition: background-color 0.3s ease;
}

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


/* ========================================
   UTILIDADES
======================================== */

.hidden {
  display: none;
}



/* ========================================
   TABLET
   768px
======================================== */

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

  .section-proyectos {
    padding: 4rem 2rem;
  }


  /* TÍTULO */

  .section-proyectos > h2 {
    font-size: var(--font-xl);
    padding-bottom: 2.5rem;
  }


  /* BANDAS */

  .subtitulo-proyectos {
    width: calc(100% + 4rem);

    margin: 3rem -2rem 2.5rem;
    padding: 1rem 2rem;

    font-size: var(--font-md);
  }


  /* GRILLA */

  .section-proyectos-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 2rem;
  }


  /* CARDS */

  .proyecto {
    height: 100%;
  }


  /* CONTENIDO */

  .content-info {
    padding: 1.25rem;
  }

  .content-info > a {
    font-size: var(--font-md);
  }

  .content-info h4 {
    font-size: var(--font-sm);
  }

  .content-info p {
    font-size: var(--font-sm);
  }


  /* BOTONES */

  .content-button {
    margin-top: 2.5rem;
  }

  .content-button a {
    min-width: 230px;

    font-size: var(--font-md);
  }
}



/* ========================================
   DESKTOP
   1024px
======================================== */

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

  .section-proyectos {
    padding: 4rem 0;
  }


  /* TÍTULO */

  .section-proyectos > h2 {
    font-size: var(--font-xxl);
  }


  /* BANDAS A TODO EL ANCHO */

  .subtitulo-proyectos {
    width: 100%;

    margin: 3rem 0 2.5rem;

    padding: 1rem 2rem;

    font-size: var(--font-lg);
  }


  /* GRILLA */

  .section-proyectos-content {
    width: calc(100% - 4rem);
    max-width: 1200px;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 2.5rem;
  }


  /*
   IMPORTANTE:
   No centramos las cards individualmente.

   Al haber dos columnas:
   
   KBS          CIMA
   Café Andino

   Café Andino queda automáticamente
   alineado a la izquierda.
  */

  .proyecto {
    width: 100%;
    height: 100%;

    margin: 0;
  }


  /* CONTENIDO */

  .content-info {
    padding: 1rem;
  }

  .content-info > a {
    font-size: var(--font-lg);
  }

  .content-info h4 {
    font-size: var(--font-sm);
    line-height: 1.45;
  }

  .content-info p {
    font-size: var(--font-sm);
    line-height: 1.6;
  }


  /* TAGS */

  .tags {
    gap: 0.6rem;
  }


  /* BOTONES */

  .content-button {
    margin-top: 2.5rem;
  }
}