/* Estilo general de la página */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f5f5f5;
  padding: 20px;
}

/* Título principal */
h1 {
  text-align: center;
  color: #006A67;
  margin-bottom: 40px;
}

/* Contenedores por nivel */
.nivel {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}

.nivel-1 {
  grid-template-columns: 1fr;
}

.nivel-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.nivel-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Tarjeta */
.card {
  position: relative;
  height: 260px;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: 0.5s;
}

/* Slide general */
.card .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: 0.5s;
}

/* Slide frontal (imagen) */
.card .slide.slide1 {
  background: #006A67;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Al hacer hover, desliza hacia arriba */
.card:hover .slide.slide1 {
  transform: translateY(-100%);
}

/* Slide trasera (información) */
.card .slide.slide2 {
  background: white;
  z-index: 2;
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  transform: translateY(100%);
}

.card:hover .slide.slide2 {
  transform: translateY(0);
}

/* Imagen circular */
.img-container {
  width: 100px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* Imagen interna */
.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
