/* 
  @project Expanding Flex Cards
  @author: Jamshid Elmi
  @created: 2022-03-25 19:13:18
  @modified: 2022-03-25 19:13:18
  @tutorial: https://youtu.be/pvjNbaV0Keo
*/
:root {
  --cb: cubic-bezier(.05, .61, .41, .95);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 100vh;
  font-family: "Roboto", sans-serif;
  transition: 0.25s;
  background: #e1e1e1;
}

body.dark {
  background: #333;
  color: white;
}

.cards {
  display: flex;
  max-width: 800px;
  width: calc(100% - 100px);
  height: 400px;
}

.cards .card .info .title {
  font-weight: bold;
  font-size: 1.2rem;
}

.cards .card .label .icon {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  background-color: white;
  color: var(--color);
  border-radius: 50%;
}

.cards .card .label .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 10px;
  white-space: normal;
  transition: 1s var(--cb);
}

.cards .card {
  position: relative;
  min-width: 60px;
  background: var(--bg);
  overflow: hidden;
  margin: 5px;
  background-size: auto 150%;
  background-position: center;
  cursor: pointer;
  transition: 0.5s var(--cb);
  border-radius: 30px;
}

.cards .card .label {
  display: flex;
  position: absolute;
  right: 0;
  height: 40px;
  transition: 0.5s var(--cb);
}

.cards .card.active .label {
  bottom: 20px;
  left: 20px;
}

.cards .card.active {
  flex-grow: 10000;
  background-size: auto 100%;
}

.cards .card:not(.active) .label {
  bottom: 10px;
  left: 10px;
}

.cards .card .shadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(
    0, #0004, transparent
  );
}

.cards .card.active .info {
  opacity: 1;
}

.cards .card:not(.active) .info {
  opacity: 0;
}

.info{
overflow-wrap:break-word;
}