/* NUESTROS PROYECTOS */

.descripcion-proyectos {
  margin: 20px 0;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.texto-introduccion {
  font-weight: 800;
  max-width: 1000px;
  margin: 0 auto 40px;
  text-align: center;
}

.descripcion-proyectos h2 {
  font-size: 3.8rem;
  font-weight: 400;
  color: #444e56;
  margin-bottom: 20px;
  margin-top: 30px;
}

.descripcion-proyectos p {
  font-size: 1.4rem;
  font-weight: 400;
  color: #686868;
  line-height: 1.6;
  margin-bottom: 25px;
}

.btn {
  display: inline-block;
  background-color: #55c9cc;
  color: #ffffff;
  padding: 12px 24px;
  margin-top: 10px;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

#btn-blanco {
  background-color: #ffffff;
  color: #444e56;
  align-self: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#btn-blanco:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.btn:hover {
  background-color: #44b2b5;
  cursor: pointer;
}
  
.carrousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  gap: 15px;
  margin: 0 auto;
  position: relative;
}

.carrousel-contenedor {
  overflow-x: auto;
  width: 100%;
  max-width: 1000px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #555555 #ffffff;
  padding-bottom: 15px;
  margin: 0 auto;
}

.carrousel-contenedor::-webkit-scrollbar {
  height: 4px;
}
.carrousel-contenedor::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.carrousel-track {
  display: flex;
  gap: 25px;
  transition: transform 0.5s ease-in-out;
  padding: 10px;
  justify-content: center;
}

.proyecto {
  flex: 0 0 300px;
  background-color: #ffa500;
  color: #ffffff;
  border-radius: 12px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  scroll-snap-align: center;
}

.proyecto:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.foto-proyecto {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.texto-proyecto {
  padding: 20px;
}

.texto-proyecto h2 {
  margin: 0 0 4px 0;
  font-size: 1.6rem;
  color: #ffffff;
}

.texto-proyecto h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  opacity: 0.8;
}

.carrusel-boton {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  z-index: 10;
}

.carrusel-boton svg {
  width: 40px;
  height: 40px;
  fill: #555555;
  transition: fill 0.3s ease;
}

.carrusel-boton:hover svg {
  fill: #000000;
}

/* Interfaz #3: Nuestros Proyectos */
.info-proyectos {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 20px;
  max-width: 2200px;
  margin-right: 30px;
  margin-left: 30px;
  margin-bottom: 50px;
}

.info-proyecto {
  display: flex;
  gap: 30px;
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;

  /* Constrain overall card height and make columns stretch */
  align-items: stretch;
  max-height: 700px;
  overflow: hidden; /* prevents images from pushing card beyond 600px */
}

.info-proyecto:nth-child(even) {
  flex-direction: row-reverse;
}

/* Collage column */
.collage {
  flex: 1 1 60%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 1fr); /* flexible rows */
  gap: 15px;

  /* Follow the card height, not the images */
  height: 700px;
  min-height: 0; /* allow shrinking within max-height */
  overflow: hidden;
}

.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop inside the grid cell */
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Collage 1: tall tile */
.img-collage-1 {
  grid-row: span 2;
}

/* Collage 2: wide tile */
.img-collage-4 {
  grid-column: span 2;
}

/* Text column */
.texto-info-proyecto {
  flex: 0 1 500px;
  max-width: 700px;
  padding: 20px;

  /* Ensure text doesn’t force the card beyond 600px */
  min-height: 0;
  overflow: auto; /* scrolls only if the text exceeds 600px card height */
}

.info-proyectos h2 {
  margin: 60px;
  font-size: 3.8rem;
  font-weight: 400;
  color: #444e56;
}

.texto-info-proyecto h3 {
  margin-top: 8px;
  margin-bottom: 4px;
  color: #444e56;
  text-decoration: none;
  font-size: 2.2rem;
  font-weight: 900;
  display: block;
  word-wrap: break-word;
}

.texto-info-proyecto h4 {
  font-size: 1.2rem;
  font-weight: 400;
  color: #55c9cc;
  margin-top: 0;
  margin-bottom: 20px;
}

.texto-info-proyecto p {
  font-size: 1.5rem;
  font-weight: 200;
  color: #686868;
  line-height: 1.6;
}

@media (max-width: 768px) {
  /* Stack project info blocks and remove the 600px cap on phones */
  .info-proyecto,
  .info-proyecto:nth-child(even) {
    flex-direction: column;
    gap: 20px;
    padding: 12px;
    align-items: stretch;
    max-height: none;
    overflow: visible;
  }

  .texto-info-proyecto {
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 12px 0px 12px;
    flex: none;
    overflow: visible; /* no scrollbars on mobile */
  }

  /* Reduce outer container padding and gaps */
  .info-proyectos {
    gap: 30px;
    padding: 8px;
    margin-right: 12px;
    margin-left: 12px;
    margin-bottom: 30px;
  }

  .texto-info-proyecto p {
	font-size: 1.2rem;
	font-weight: 200;
	color: #686868;
	line-height: 1.5;
	}

  .info-proyectos h2 {
    margin: 24px 12px;
    font-size: 2.4rem;
  }

  /* Collapse collage to single column */
  .collage {
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
    grid-template-rows: none;
    gap: 12px;
    width: 100%;
    height: auto;
    overflow: hidden;
  }

  .img-collage-1,
  .img-collage-4 {
    grid-row: auto !important;
    grid-column: auto !important;
  }

  .collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Carousel adjustments for small screens */
  .carrousel-wrapper {
    padding: 0 12px;
  }

  .carrousel-contenedor {
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    padding-left: 6px;
    padding-right: 6px;
  }

  .carrousel-track {
    gap: 12px;
    padding: 6px;
    justify-content: flex-start;
  }

  .proyecto {
    flex: 0 0 auto;
    width: 90%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 10px;
  }

  .foto-proyecto {
    height: 180px;
  }

  .texto-proyecto {
    padding: 14px;
    text-align: center;
  }

  .texto-proyecto h2 { font-size: 1.2rem; }
  .texto-proyecto h3 { font-size: 0.95rem; }

  /* Smaller navigation controls on mobile */
  .carrusel-boton { width: 44px; height: 44px; }
  .carrusel-boton svg { width: 28px; height: 28px; }
}