h1 {
  text-align: center;
  padding: 40px 20px;
  font-size: 3rem;
  font-weight: 700;
  color: #004d43;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
  animation: fadeInDown 1s ease;
    font-size: 3rem !important;
  font-weight: 800 !important;
}

#descripcion-sobrenosotros {
  max-width: 1000px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  text-align: justify;
  animation: fadeInDown 1s ease;
  text-align: center;
}

.sobrenosotros,
.nuestrotrabajo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto 4rem;
}

.sobrenosotros > div,
.nuestrotrabajo > div {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.8s ease both;
}

.sobrenosotros > div:hover,
.nuestrotrabajo > div:hover {
  transform: scale(1.03);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
}

.sobrenosotros img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
  transition: transform 0.3s ease;
  border-radius: 1.5rem 1.5rem 0 0;
}

.nuestrotrabajo img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
  transition: transform 0.3s ease;
  border-radius: 1.5rem 1.5rem 0 0;
}

.sobrenosotros > div:hover img,
.nuestrotrabajo > div:hover img {
  transform: scale(1.05);
}

.sobrenosotros-texto {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sobrenosotros h2,
.nuestrotrabajo h2 {
  font-size: 1.6rem;
  color: #005d51;
  margin: 0 0 1rem;
  position: relative;
}

.sobrenosotros h2::after,
.nuestrotrabajo h2::after {
  content: '';
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, #009688, #004d43);
  position: absolute;
  bottom: -8px;
  left: 0;
  border-radius: 2px;
}

.sobrenosotros p,
.nuestrotrabajo p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  text-align: justify;
  margin-top: 1rem;
}

@media (max-width: 767px) {

  h1 {
    font-size: 2rem;
    padding: 30px 15px;
  }

  #descripcion-sobrenosotros {
    font-size: 1rem;
    padding: 0 1.5rem;
  }

  .sobrenosotros,
  .nuestrotrabajo {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sobrenosotros > div,
  .nuestrotrabajo > div {
    padding: 0.5rem;
  }

  .sobrenosotros img,
  .nuestrotrabajo img {
    height: 180px;
    border-radius: 1.5rem;
  }

  .sobrenosotros-texto {
    padding: 1rem 0.6rem;
  }

  .sobrenosotros h2,
  .nuestrotrabajo h2 {
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
  }

  .sobrenosotros p,
  .nuestrotrabajo p {
    font-size: 1rem;
    margin-top: 0.3rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {

  h1 {
    font-size: 2.5rem;
    padding: 35px 20px;
  }

  #descripcion-sobrenosotros {
    font-size: 1.05rem;
    padding: 0 1.8rem;
  }

  .sobrenosotros,
  .nuestrotrabajo {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .sobrenosotros img,
  .nuestrotrabajo img {
    height: 200px;
    border-radius: 1.5rem; 
  }

  .sobrenosotros h2,
  .nuestrotrabajo h2 {
    font-size: 1.5rem;
  }

  .sobrenosotros p,
  .nuestrotrabajo p {
    font-size: 1.1rem;
  }
}
