/* Team Grid */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}

.team-grid-item {
  min-width: 0;
}

.team-grid-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  background-color: #ffffff;
  border: 1px solid #024c8c;
  border-radius: 12px;
  padding: 32px;
}

.team-grid-image {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  margin: 0 0 20px;
  border-radius: 50%;
  overflow: hidden;
}

.team-grid-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.team-grid-name {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: #005691;
}

.team-grid-title {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: #666666;
}

.team-grid-button {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  border: none;
  background: transparent;
  text-decoration: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.team-grid-button:hover {
  opacity: 0.85;
}

.team-grid-button .elementor-button-content-wrapper {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}

.team-grid-button .elementor-button-icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.team-grid-button .elementor-button-icon svg {
  width: 20px;
  height: 20px;
}

.team-grid-button .elementor-button-text {
  color: #005691;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

body.team-grid-popup-open {
  overflow: hidden;
}

.team-grid-popup[hidden] {
  display: none;
}

.team-grid-popup {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.team-grid-popup-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.team-grid-popup-content {
  position: relative;
  z-index: 1;
  width: 700px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 48px;
  background-color: #ffffff;
}

.team-grid-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  color: #005691;
  cursor: pointer;
}

.team-grid-popup-close svg {
  display: block;
  width: 30px;
  height: 31px;
  fill: currentColor;
}

.team-grid-popup-description {
  color: #333333;
}

.team-grid-popup-description > :first-child {
  margin-top: 0;
}

.team-grid-popup-description > :last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .team-grid-popup {
    padding: 16px;
  }

  .team-grid-popup-content {
    max-height: calc(100vh - 32px);
    padding: 40px 24px 32px;
  }
}
