/* ======= Grid Layout ======= */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 15px;
  justify-content: center;
  align-items: start;
  margin-top: 30px;
}

/* ======= Main Card Structure ======= */
.content {
  position: relative;
  animation: animatop 0.9s cubic-bezier(0.425, 1.14, 0.47, 1.125) forwards;
}

.card {
  width: 100%;
  min-height: 180px;
  padding: 20px;
  border-radius: 5px;
  background-color: #fff;
  border: 2px solid #e0e0e0;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0px 16px 32px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.card:after {
  content: '';
  display: block;
  width: 190px;
  height: 300px;
  background: #00bcd4;
  position: absolute;
  animation: rotatemagic 0.75s cubic-bezier(0.425, 1.04, 0.47, 1.105) 1s both;
  border-radius: 30%;
}
.selected-card .card {
  border: 2px solid #00bcd4;
}

.selected-card {
  position: relative;
}
.selected-card::before {
  content: '✔';
  position: absolute;
  top: 12px;
  right: 16px;
  left: auto;
  width: 28px;
  height: 28px;
  background: #00bcd4;
  color: #fff;
  font-size: 1.3em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  pointer-events: none;
  z-index: 3;
}

/* ======= Profile Info Section ======= */
.firstinfo {
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 2;
  position: relative;
}

.firstinfo img {
  border-radius: 50%;
  width: 110px;
  height: 110px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profileinfo {
  padding: 0 20px;
}

.profileinfo h1 {
  font-size: 1em;
  margin-bottom: 4px;
  color: #222;
  font-weight: 700;
}

.profileinfo h3 {
  font-size: 1.05em;
  color: #00bcd4;
  font-style: italic;
  margin-bottom: 6px;
}

.profileinfo p.bio {
  color: #555;
  font-size: 0.8em;
  line-height: 1.4;
  margin-bottom: 0;
  
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Show only 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ======= Bottom Badge Bar ======= */
.badgescard {
  padding: 10px 20px;
  border-radius: 8px;
  background-color: #00bcd4;
  color: #fff;
  width: calc(100% - 40px);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
  position: absolute;
  z-index: -1;
  left: 20px;
  bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: animainfos 0.5s cubic-bezier(0.425, 1.04, 0.47, 1.105) 0.75s forwards;
}

.badgescard span {
  font-size: 1.5em;
  margin: 0 8px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.badgescard span:hover {
  opacity: 1;
}

/* ======= Animations ======= */
@keyframes animatop {
  0% {
    opacity: 0;
    bottom: -200px;
  }
  100% {
    opacity: 1;
    bottom: 0;
  }
}

@keyframes animainfos {
  0% {
    bottom: 15px;
  }
  100% {
    bottom: -35px;
  }
}

@keyframes rotatemagic {
  0% {
    opacity: 0;
    transform: rotate(0deg);
    top: -24px;
    left: -253px;
  }
  100% {
    transform: rotate(-30deg);
    top: -24px;
    left: -78px;
  }
}


/* ======= Circular Image with Curved Text ======= */
.circle-wrapper {
  position: relative;
}

.circle-wrapper img {
  border-radius: 50%;
  object-fit: cover;
  top: 10px;
  left: 10px;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.circle-text {
  width: 100%;
  height: 100%;
  transform: rotate(120deg); /* Flip text to appear correctly at bottom */
  position: absolute;
  top: 0;
  left: -5px;
  z-index: 1;
}

