.popup-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  max-width: 95%;
  padding: 24px;
}

#popup-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#speaker-popup-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#popup-name {
  font-size: 24px;
  font-weight: bold;
  color: #009ee3;
  margin: 0;
}

#popup-affiliation {
  font-size: 16px;
  color: black;
  margin: 0;
}

#popup-biography {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
  text-align: justify;
  color: black;
}

.speaker-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#speaker-popup {
  border: 5px solid transparent;
  border-radius: 12px;
  background-image: linear-gradient(#ffffff
, #ffffff
),
    linear-gradient(
      135deg,
      #bb657e 0%,
      #b96fa0 20%,
      #8966a2 40%,
      #3e9ac7 70%,
      #00aee3 100%
    );
  background-origin: border-box;
  background-clip: padding-box, border-box;
  max-width: 1000px;
  width: 90%;
  height: 450px;
  overflow-y: auto;
  position: relative;
}

.popup-inner {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 24px;
}

#close-popup {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* .speakers-grid: 6-column responsive grid for speakers, with styled tiles */
.speakers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.speaker-item {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.speaker-item:hover {
  transform: translateY(-4px);
}

.speaker-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #009ee3;
  margin-bottom: 8px;
}

.speaker-item h3 {
  font-size: 16px;
  margin: 4px 0;
  font-weight: bold;
  color: black;
  position: relative;
  display: inline-block;
}

.speaker-item h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background-color: #009ee3;
  margin: 12px auto 0;
}

.speaker-item p {
  font-size: 13px;
  color: black;
  margin: 0;
  font-weight: normal;
}

@media (max-width: 1200px) {
  .speakers-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .speakers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .popup-row {
    flex-direction: column;
    align-items: center;
  }

  #popup-image {
    width: 100%;
    max-width: 300px;
    height: auto;
  }

  #speaker-popup {
    width: 95%;
    max-height: 90vh;
  }

  #speaker-popup-content {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .speakers-grid {
    grid-template-columns: 1fr;
  }

  #popup-name {
    font-size: 20px;
  }

  #popup-affiliation {
    font-size: 14px;
  }

  #popup-biography {
    font-size: 13px;
  }
}
