/* Experts Cards */
.wd-card-dtls {
  height: 570px;
  width: 310px !important;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  border: 1px solid #e9e6e660;
}

/* Hover effect for the entire card */
.wd-card-dtls:hover {
  transform: translateY(-6px);
  border: 1px solid #d3d3d3;
}

/* Changes the color of the main title on hover */
.wd-card-dtls:hover h3 {
  color: #2563eb !important;
  transition: color 0.3s ease;
}

/* Card image section */
.wd-card-img {
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  height: auto;
}

.wd-card-img img {
  object-fit: cover;
  transition: transform 0.5s ease 0.1s;
}

/* Image zoom effect on card hover */
.wd-card-dtls:hover .wd-card-img img {
  transform: scale(1.06);
}

/* Card text container. Uses Flexbox to fill remaining space and stacks its children. */
.wd-card-txt {
  flex: 1;
  /* Allows this container to grow and fill available space */
  display: flex;
  flex-direction: column;
  margin: 1.5rem;
  /* Equivalent to Bootstrap's m-3 */
}

/* Container for the main title (name). Fixed height to prevent layout shifts. */
.card-title-fixed {
  height: 2.5rem;
  /* Fixed height for two lines of text */
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  /* Limits text to 2 lines */
}

/* Container for the professional title. Fixed height for one line. */
.card-subtitle-fixed {
  height: 1.2rem;
  /* Fixed height for one line of text */
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  /* Limits text to 1 line */
}

/* Styles for main titles (h3) */
.wd-card-dtls h3 {
  font-size: 1.125rem !important;
  font-weight: 600;
  color: #354050 !important;
  margin-bottom: 0.5rem;
  width: 175px;
  /* Adjusted for better spacing */
}

/* Styles for subtitles (h4) */
.wd-card-dtls h4 {
  font-weight: 400;
  color: #5d7492;
  margin-bottom: 6px;
}

/* Styles for the short description paragraph */
.wd-card-dtls p {
  font-size: 0.875rem;
  font-weight: 400;
  color: #5d7492;
  margin-bottom: 18px;
}

/* Truncates text content to a fixed number of lines */
.truncate {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.truncate.description {
  height: 45px;
  /* Fixed height for the description block */
  -webkit-line-clamp: 3;
  /* Limits to 3 lines */
}

.single-line-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expertise list container */
.wd-expert-list {
  padding: 0;
  margin: 0;
  list-style: none;
  height: 60px;
}

/* Expertise list items */
.wd-expert-list li {
  font-size: 0.875rem;
  font-weight: 400;
  color: #344256;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  height: 20px;
}

/* Expertises title */
.expertise-title {
  color: #5d7492 !important;
  font-size: 0.800rem !important;
}

/* Card footer */
.wd-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.divider {
  border: none;
  height: 1px;
  background-color: rgb(229, 229, 229);
  margin: 1rem 0;
}

/* Price text */
p.wd-prize {
  display: block;
  font-size: 1rem !important;
  font-weight: 500;
  color: #354050 !important;
  margin-bottom: 0;
}

/* Other general styles */
.wd-card-ratings {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wd-star-listing li span {
  font-size: 14px;
  font-weight: 600;
  color: #16171b;
  margin: 0;
}

.wd-card-ratings .wd-star-listing {
  gap: 6px;
}

.wd-card-ratings .wd-star-listing li img {
  width: 17px;
  height: 18px;
}

.btn-schedule-now {
  background-color: #ffffffb7;
  color: #2564eb;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 0.700rem !important;
}

.btn-schedule-now:hover {
  background-color: #fff;
  color: #2564eb;
  transition: all 0.3s ease;
  transform: scale(1.08);
  transition: all 0.3s ease;
}

/* Hide button by default and show on hover */
.wd-card-dtls .btn-schedule-now {
  opacity: 0.1;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.wd-card-dtls:hover .btn-schedule-now,
.wd-card-dtls.touch-active .btn-schedule-now {
  opacity: 1;
  visibility: visible;
}

.material-symbols-outlined {
  color: #2563eb;
  font-size: 0.80rem;
}

.video-icon-container {
  background-color: #fff !important;
  border-radius: 50% !important;
  width: 2.25rem !important;
  height: 2.25rem !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  line-height: 1 !important;
  min-width: auto !important;
  max-width: none !important;
  margin-bottom: 6px !important;
}

.video-icon-container:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-icon {
  color: #2563eb;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============ MOBILE RESPONSIVE ============ */
@media (min-width: 768px) and (max-width: 991.98px) {
  .wd-card-dtls {
    width: 320px !important;
    margin-bottom: 20px;
  }

  .wd-card-img {
    height: 180px;
  }
}

@media (max-width: 767.98px) {
  .wd-card-dtls {
    width: 100% !important;
    margin-bottom: 20px;
  }

  .wd-card-img {
    height: 200px;
  }

  .wd-card-dtls h3,
  .wd-card-dtls h4,
  .wd-card-dtls p,
  .wd-expert-list li,
  .wd-card-ratings .wd-star-listing li span,
  p.wd-prize {
    font-size: 14px;
  }

  .wd-card-dtls h3 {
    width: 200px;
  }

  .wd-card-ratings .wd-star-listing li img {
    width: 15px;
    height: 15px;
  }

  .btn-schedule-now {
    background-color: #fff;
  }

  .position-absolute.mb-2.d-flex .btn-schedule-now:active {
    opacity: 1;
    transform: scale(0.95);
  }
}
