/*
  Enhanced team section with cards that preserve the existing circle design
  and zoom functionality while adding proper card containers.
  
  Simple responsive styles for a "Meet the Team" section.
  The layout is based on card-style panels showing a circular headshot,
  the team member's name and their role. Colours and spacing are
  inspired by the Backstage theme variables found in the site's CSS
  (primary colour #4757F2 for headings and light backgrounds for cards).
*/

/* Global styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f6f8;
  color: #333;
}

/* Section container */
.team-section {
  padding: 40px 20px;
  text-align: center;
}

/* Section title */
.team-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #00000; /* Primary accent colour from theme */
}

/* Container for the cards */
.team-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Individual team member card */
.team-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 280px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

/* Enhanced card hover effect */
.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* --- Avatar circle with inner zoom + overlay --- */
.avatar {
  width: 160px;               /* adjust to your preferred size */
  height: 160px;
  border-radius: 50%;
  overflow: hidden;           /* keeps zoomed image clipped in the circle */
  position: relative;
  display: block;
  margin: 0 auto 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.06);
  text-decoration: none;      /* if it's an <a> */
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);        /* inner image starts at normal scale */
  transition: transform .35s ease;
  display: block;
}

/* Grey overlay with centered CTA text */
.overlay-cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .02em;
  color: #fff;
  background: rgba(128,128,128,.45);  /* semi-transparent grey */
  opacity: 0;                          /* hidden by default */
  transition: opacity .25s ease;
}

.overlay-cta .arrow {
  margin-left: .35rem;
}

/* Hover behaviour: zoom the inner image and reveal overlay */
.avatar:hover img { 
  transform: scale(1.08); 
}    /* zooms INSIDE the circle */

.avatar:hover .overlay-cta { 
  opacity: 1; 
}

/* Card hover triggers avatar effects */
.team-card:hover .avatar img { 
  transform: scale(1.08); 
}

.team-card:hover .overlay-cta { 
  opacity: 1; 
}

.avatar:focus-visible {
  outline: 3px solid #4757F2;   /* or your brand colour */
  outline-offset: 4px;
}

/* Team member information */
.team-info {
  text-align: center;
  width: 100%;
}

/* Member name */
.team-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 8px 0 4px 0;
  color: #333;
}

/* Member role */
.team-role {
  color: #555;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Responsive adjustments for small screens */
@media (max-width: 600px) {
  .team-container {
    flex-direction: column;
    align-items: center;
  }
  .team-card {
    width: 90%;
    max-width: 350px;
  }
  
  .avatar {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 480px) {
  .team-card {
    width: 95%;
    padding: 16px;
  }
  
  .team-title {
    font-size: 1.6rem;
  }
  
  .avatar {
    width: 120px;
    height: 120px;
  }
}

/* ===== MODAL STYLES ===== */

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal container */
.modal {
  background: #ffffff;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

/* Modal header */
.modal-header {
  position: relative;
  padding: 30px 30px 20px;
  border-bottom: 1px solid #eee;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}

/* Profile image in modal */
.modal-profile-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Profile details */
.pd-details {
  flex: 1;
  text-align: left;
}

.pd-details h3 {
  font-size: 2rem;
  margin: 0 0 15px 0;
  color: #333;
  font-weight: bold;
}

.speaker-designation {
  margin-bottom: 20px;
}

.speaker-designation .h5-size {
  font-size: 1.1rem;
  color: #666;
  margin: 4px 0;
}

/* Social handles */
.pd-action {
  display: flex;
  justify-content: flex-start;
  margin-top: 15px;
}

.social-handles {
  display: flex;
  gap: 10px;
}

.social-handles .ui.button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0077b5;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  padding: 0;
}

.social-handles .ui.button:hover {
  background-color: #005885;
  transform: translateY(-2px);
}

.linkedin-icon::before {
  content: "in";
  font-weight: bold;
  font-size: 14px;
}

/* Modal content */
.modal-content {
  padding: 0 30px 30px;
}

/* Profile details section */
.profile-details {
  margin-top: 20px;
}

.profile-details h5 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 15px 0;
  color: #333;
}

/* About section */
.bs-description {
  margin-bottom: 25px;
}

.markdown-contain {
  line-height: 1.6;
  color: #555;
}

.markdown-contain p {
  margin: 0 0 15px 0;
}

.markdown-contain p:last-child {
  margin-bottom: 0;
}

.markdown-contain strong {
  color: #333;
  font-weight: 600;
}

/* Skills section */
.mgt3 {
  margin-top: 25px;
}

.mgt3 h5 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 15px 0;
  color: #333;
}

.bs-grp-label {
  margin-top: 10px;
}

.skills.bs-group-label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bs-label.tiny {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid;
  display: inline-block;
  margin: 2px;
  background-color: var(--custom-label-bg);
  border-color: var(--custom-label-bdr);
  color: #333;
}

/* Qualifications styling - now under About section */
.qualifications {
  margin: 15px 0 20px 0;
  padding: 0;
  background: none;
  text-align: left;
}

.qualifications strong {
  color: #333;
  font-size: 1rem;
  font-weight: 600;
}

/* Roles list */
.roles-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.roles-list li {
  padding: 4px 0;
  margin: 2px 0;
  font-weight: 600;
  color: #333;
}

/* Mobile modal adjustments */
@media (max-width: 600px) {
  .modal {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header,
  .modal-content {
    padding: 20px;
  }
  
  .modal-profile-image {
    width: 80px;
    height: 80px;
  }
  
  .pd-details h3 {
    font-size: 1.3rem;
  }
  
  .skills.bs-group-label {
    justify-content: center;
  }
}