﻿.card {
  position: relative;
  overflow: hidden;
  width: 300px;
  height: 300px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  padding: 20px;
  text-decoration: none;
  color: #000;
}

  .card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
  }

  .card p {
    margin-top: 130px;
    opacity: 0;
    color: black;
  }

.info {
  bottom: 0;
  left: 0;
  padding: 15px;
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #41404079;
  transition: all 0.3s;
}

  .info span {
    text-align: left;
  }

.card-flex {
  margin: 10px 0;
  height: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.name {
  font-size: 20px;
  font-weight: 600;
  color: #e9e7e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.type {
  font-size: 16px;
  font-weight: 400;
  color: #e9e7e7;
}

.card-hover:hover img, .card-hovered img {
  top: 20px;
  left: 20px;
  height: 100px;
  width: 100px;
  border-radius: 50%;
}

.card-hover:hover .info, .card-hovered .info {
  box-sizing: border-box;
  left: 50%;
  top: 30px;
  height: 80px;
  color: #000;
  width: 50%;
}

.card-hover:hover p, .card-hovered p {
  animation: fadeUp 0.5s forwards;
}

.card-flex *, ::after, ::before {
  box-sizing: content-box;
}

@media (max-width: 768px) {
  .card-hover img {
    top: 20px;
    left: 20px;
    height: 100px;
    width: 100px;
    border-radius: 50%;
  }
  .card-hover .info {
    box-sizing: border-box;
    left: 50%;
    top: 30px;
    height: 80px;
    color: #000;
    width: 50%;
  }

  .card-hover p {
    animation: fadeUp 0.5s forwards;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
