.team-grid {
  display: grid;
  gap: 2rem;
  row-gap: .5rem;
  margin: 0 auto;
}

/* Desktop Grid */
@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(var(--sp-story-grid-columns), 1fr);
  }
}

/* Tablet Grid */
@media (min-width: 768px) and (max-width: 1023px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Grid */
@media (max-width: 767px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  overflow: hidden;
}

.team-card__inner {
  display: contents;
  text-align: center;
}

.team-card__image {
  grid-row: 1;
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}

.video-trigger {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

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

.team-card__image:hover img {
  transform: scale(1.05);
}

.play-button-overlay {.team-grid {
  display: grid;
  gap: 2rem;
  row-gap: .5rem;
  margin: 0 auto;
}

/* Desktop Grid */
@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(var(--sp-story-grid-columns), 1fr);
  }
}

/* Tablet Grid */
@media (min-width: 768px) and (max-width: 1023px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Grid */
@media (max-width: 767px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  overflow: hidden;
}

.team-card__inner {
  display: contents;
  text-align: center;
}

.team-card__image {
  grid-row: 1;
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}

.video-trigger {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.team-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.team-card__image:hover img {
  transform: scale(1.05);
}

.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.team-card__image:hover .play-button-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  transition: transform 0.3s ease;
}

.team-card__image:hover .play-icon {
  transform: scale(1.1);
}

h3.team-card__name {
  grid-row: 2;
  margin: 2rem 1rem 0 1rem;
  font-size: 2rem;
  font-weight: 400;
  line-height: normal;
  color: #000;
}

@media (max-width: 767px) {
  h3.team-card__name {
    margin: 1rem 1rem 0 1rem;
    font-size: 1.5rem;
  }
}

p.team-card__title {
  grid-row: 3;
  margin: 0 1rem 1.5rem 1rem;
  font-size: 1.5rem;
  color: #000;
  font-weight: 300;
  line-height: normal;
}

@media (max-width: 767px) {
  p.team-card__title {
    margin: 0 1rem;
    font-size: 1.3rem;
  }
}

.team-card__button {
  grid-row: 4;
  padding: 1rem 1rem 1.5rem 1rem;
}

/* Video Modal Styles */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal:target {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-modal:target .modal-content {
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  margin: 20px;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  z-index: 10000;
  line-height: 1;
}

.close-modal:hover {
  color: #ccc;
}

.video-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

/* HubSpot video player styles */
.video-container .hs-video-wrapper {
  position: relative;
  width: 100% !important;
  height: auto !important;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.video-container .hs-video-wrapper iframe,
.video-container .hs-video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Mobile Responsive Modal */
@media (max-width: 767px) {
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .close-modal {
    top: -35px;
    font-size: 30px;
  }
}

@supports not (grid-template-rows: subgrid) {
  .team-card {
    display: flex;
    flex-direction: column;
  }
  
  .team-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .team-card__image {
    flex-shrink: 0;
  }
  
  .team-card__name {
    flex-grow: 0;
  }
  
  .team-card__title {
    flex-grow: 0;
  }
  
  .team-card__button {
    margin-top: auto;
  }
}
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.team-card__image:hover .play-button-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  transition: transform 0.3s ease;
}

.team-card__image:hover .play-icon {
  transform: scale(1.1);
}

h3.team-card__name {
  grid-row: 2;
  margin: 2rem 1rem 0 1rem;
  font-size: 2rem;
  font-weight: 400;
  line-height: normal;
  color: #000;
}

@media (max-width: 767px) {
  h3.team-card__name {
    margin: 1rem 1rem 0 1rem;
    font-size: 1.5rem;
  }
}

p.team-card__title {
  grid-row: 3;
  margin: 0 1rem 1.5rem 1rem;
  font-size: 1.5rem;
  color: #000;
  font-weight: 300;
  line-height: normal;
}

@media (max-width: 767px) {
  p.team-card__title {
    margin: 0 1rem;
    font-size: 1.3rem;
  }
}

.team-card__button {
  grid-row: 4;
  padding: 1rem 1rem 1.5rem 1rem;
}

/* Video Modal Styles - CSS only using :target */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal:target {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-modal:target .modal-content {
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  margin: 20px;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  z-index: 10000;
  line-height: 1;
}

.close-modal:hover {
  color: #ccc;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Mobile Responsive Modal */
@media (max-width: 767px) {
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .close-modal {
    top: -35px;
    font-size: 30px;
  }
}

@supports not (grid-template-rows: subgrid) {
  .team-card {
    display: flex;
    flex-direction: column;
  }
  
  .team-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .team-card__image {
    flex-shrink: 0;
  }
  
  .team-card__name {
    flex-grow: 0;
  }
  
  .team-card__title {
    flex-grow: 0;
  }
  
  .team-card__button {
    margin-top: auto;
  }
}
