.contenedor {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;

}

.caja {
  position: relative;
  width: 400px;
  height: 400px;
  background: #c3e5e7;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  overflow: hidden;
}

.tapa {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0077ff;
  color: white;
  transition: transform 0.7s ease;
  border-radius: 15px;
  z-index: 2;
  
}

.tapa button {
  background: rgb(44, 97, 189);
  color: #eef0f2;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
margin-left:  162px;
}

.tapa button:hover {
  background: #e3e3e3;
}

/* Movimiento de la tapa al abrir */
.tapa.abierta {
  transform: translateY(-120%);
}

.contenido {
  padding: 20px;
  text-align: center;
  z-index: 1;
}

.contenido h2 {
  color: #0077ff;
  margin-bottom: 5px;
}

.contenido p {
  color: #444;
  font-size: 23PX;
}

.titulo{
    width: 300px;
    height: 100px;
    font-size: 50px;
    margin: auto;
    background-color: #497bb5;
padding: 20px;
border-radius: 20px;
text-align: center;
}
.img{
    width: 100%;
    
}
h3{
  text-align: center;
  font-size: 25px;
}
.NOSOTROS{
    background-color: rgb(138, 135, 238);
    width: 8%;
    padding: 5px;
    font-size: 25px;
    text-align: center;
    border-radius: 20px;
    height: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: absolute;
    left: 10px;
    top: 50px;
    transform: translateY(-110%);}

  .volver{
  background-color:rgb(95, 133, 247);
  padding: 5px;
  font-size: 30px;
  width: 80px;
  text-align: center;
  margin: auto;
  border-radius: 10PX;

}
.volver a{
  text-decoration: none;
}

.volver:hover{ background-color:rgb(132, 189, 255) ;
}
.sc{
  background-color: rgb(95, 133, 247);
  padding: 5px;
  font-size: 30px;
  width: 80px;
  text-align: center;
  margin: auto;
  border-radius: 10PX;
  text-decoration: none;
  
}
.leidy{
  display: flex;
  gap: 5px;
}
.sc a{
  text-decoration: none;
}

/* ==========================================================
   RESPONSIVE (se agregó al final, no cambia el diseño de escritorio)
   ========================================================== */

/* Celular: las cajas se adaptan al ancho de la pantalla */
@media (max-width: 768px){
    body{
        padding-top: 60px;      /* espacio para el botón del menú */
    }
    .NOSOTROS{
        width: auto;            /* el botón se ajusta a su texto */
        padding: 5px 12px;
        font-size: 18px;
    }
    .titulo{
        width: 90%;
        max-width: 300px;
        height: auto;
        font-size: 32px;
    }
    .caja{
        width: 100%;
        max-width: 400px;
        height: auto;
        min-height: 400px;      /* mínimo igual que en escritorio */
    }
    .tapa button{
        display: block;
        margin: 0 auto;         /* botón centrado en cualquier ancho */
    }
    .contenido p{
        font-size: 18px;
    }
}
