/* ----------------------------------
   Leading Expert Styles
---------------------------------- */

/* Force trigger text to white */
.leading-expert-details,
.leading-expert-details * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important; /* Safari/Chrome fix */
  cursor: pointer;
  position: relative;
}

/* Tooltip (desktop only) */
.leading-expert-details::after {
  content: "Read more about Jamal Najem";
  position: absolute;
  background: black;
  color: white;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
}

/* Show tooltip only on hover-capable devices */
@media (hover: hover) and (pointer: fine) {
  .leading-expert-details:hover::after {
    opacity: 1;
  }
}

/* ----------------------------------
   Modal Styles
---------------------------------- */

#expert-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.95);
  color: white;

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;

  /* Prevent background scroll when modal is open */
  overflow-y: auto;
}

/* Modal content box */
#expert-modal .content {
  max-width: 700px;
  width: 100%;
  max-height: 80vh;     /* fit on screen */
  overflow-y: auto;     /* scroll if text is too long */
  background: #000;
  border-radius: 10px;
  padding: 30px;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  position: relative;
  animation: fadeInScale 0.25s ease;
}

/* Close button */
#expert-modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease;
}

#expert-modal .close:hover {
  transform: scale(1.2);
}

/* ----------------------------------
   Mobile adjustments
---------------------------------- */
@media (max-width: 767px) {
  #expert-modal .content {
    max-height: 70vh;   /* shorter on phones */
    padding: 20px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;   /* easier reading on small screens */
  }
}

/* ----------------------------------
   Animation
---------------------------------- */
@keyframes fadeInScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Ensure text is above the image overlay */
.leading-expert-details {
  position: relative;
  z-index: 10; /* higher than the image */
  pointer-events: auto; /* force clicks to work */
}

/* Sometimes Salient images have overlays, push them back */
.nectar-responsive-text,
.leading-expert-details p {
  position: relative;
  z-index: 10;
}

/* Fallback: ensure images don’t block clicks */
img {
  pointer-events: none; /* images won’t block taps */
}

/* Mobile: underline clickable text */
@media (max-width: 767px) {
  .leading-expert-details,
  .leading-expert-details p {
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.7); /* softer white */
    text-underline-offset: 3px; /* a little spacing */
  }
}


