/* Team Members Elementor Widget Styles */

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
}

.team-members-editor-notice {
  margin-bottom: 20px;
  padding: 15px 20px;
  border: 1px dashed #f0b429;
  background: #fff8e5;
  color: #8a6d3b;
  border-radius: 6px;
}

.no-team-members--custom {
  border-color: #f0b429;
  background: #fff8e5;
  color: #8a6d3b;
}

.team-member-card {
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: none;
  display: flex;
  flex-direction: column;
  text-align: center;
  border: none;
  cursor: pointer;
}

.team-member-card:hover {
  transform: none;
  box-shadow: none;
}

.team-member-image {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.team-member-image img {
  width: 100%;
  height: 391px !important;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.team-member-card:hover .team-member-image img {
  transform: scale(1.05);
}

.placeholder-image {
  width: 100%;
  height: 391px !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-member-content {
  padding: 10px 15px 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  gap: 10px;
}

.team-member-name {
  font-family: "Prompt", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #566c95;
  line-height: 2.4em;
  text-align: center;
}

.team-member-position {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  color: #272727;
  margin: 0;
  font-weight: 400;
  line-height: 1.5em;
  text-align: center;
}

.team-member-bio {
  display: none;
}

.no-team-members {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .team-members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .team-member-content {
    padding: 8px 12px 20px;
    gap: 8px;
  }

  .team-member-name {
    font-size: 14px;
    line-height: 2.2em;
  }

  .team-member-position {
    font-size: 12px;
  }

  .team-member-image img,
  .placeholder-image {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .team-members-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .team-member-image img,
  .placeholder-image {
    height: 391px !important;
  }

  .team-member-name {
    font-size: 15px;
    line-height: 2.3em;
  }

  .team-member-position {
    font-size: 13px;
  }
}

/* Alternative card layouts */
.team-members-grid.layout-horizontal .team-member-card {
  flex-direction: row;
  align-items: stretch;
}

.team-members-grid.layout-horizontal .team-member-image {
  width: 40%;
  min-width: 150px;
}

.team-members-grid.layout-horizontal .team-member-content {
  width: 60%;
}

.team-members-grid.layout-horizontal .team-member-image img,
.team-members-grid.layout-horizontal .placeholder-image {
  height: 100%;
  min-height: 200px;
}

/* Minimal style variant */
.team-members-grid.style-minimal {
  background: transparent;
  padding: 0;
}

.team-members-grid.style-minimal .team-member-card {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  text-align: center;
}

.team-members-grid.style-minimal .team-member-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.team-members-grid.style-minimal .team-member-image {
  margin-bottom: 0;
  padding: 20px 20px 0;
}

.team-members-grid.style-minimal .team-member-image img {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  display: block;
  object-fit: cover;
}

.team-members-grid.style-minimal .placeholder-image {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  background: #e9ecef;
  border: none;
}

/* Loading animation */
.team-members-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.team-members-loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Accessibility improvements */
.team-member-card:focus-within {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.team-member-name:focus {
  outline: none;
}

/* Print styles */
@media print {
  .team-members-grid {
    display: block;
  }

  .team-member-card {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 20px;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .team-member-card:hover {
    transform: none;
  }
}

/* Team Member Modal Styles - Based on Figma Design */
.team-member-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(68, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  height: 100%;
  max-height: 580px;
  max-width: 800px;
  position: relative;
  overflow-y: auto;
  padding: 38.9px 107.5px 40px 92.5px;
  box-sizing: border-box;
  text-align: center;
}

.modal-name {
  font-family: "Prompt", sans-serif;
  font-weight: 300;
  font-size: 32px;
  line-height: 1.2em;
  letter-spacing: -6.25%;
  color: #566c95;
  margin: 0 0 10px 0;
  text-align: center;
}

.modal-position {
  font-family: "Prompt", sans-serif;
  font-weight: 300;
  font-size: 32px;
  line-height: 1.2em;
  letter-spacing: -6.25%;
  color: #566c95;
  margin: 0 0 30px 0;
  text-align: center;
}

.modal-bio {
  font-family: "Prompt", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5em;
  color: #54595f;
  text-align: left;
  margin: 0;
}

.modal-bio p {
  margin-bottom: 15px;
}

.modal-bio p:last-child {
  margin-bottom: 0;
}

.modal-close {
  position: fixed;
  top: 50%;
  left: 48%;
  transform: translate(385px, -275px);
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  z-index: 10002;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 1);
  opacity: 0.8;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    padding: 30px 20px 40px;
    max-height: 70vh;
  }

  .modal-close {
    transform: translate(36vw, -33vh);
  }

  .modal-name,
  .modal-position {
    font-size: 24px;
  }

  .modal-bio {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 20px 15px 30px;
  }

  .modal-close {
    transform: translate(37vw, -34vh);
  }

  .modal-name,
  .modal-position {
    font-size: 20px;
  }

  .modal-bio {
    font-size: 13px;
  }
}
