/* Employee card grid */
.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.employee-card-grid li {
  margin-top: 0 !important;
}

.employee-card-grid .wp-block-group,
.employee-card-grid .wp-block-columns,
.employee-card-grid .wp-block-row {
  width: 100%;
}

.employee-card-grid > * {
  width: 100%;
}

.employee-card-grid > * .employee-card {
  flex: 1;
}

/* Tablet */
@media (max-width: 1200px) {
  .employee-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .employee-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Employee card styles */
.employee-card {
  position: relative;
  min-height: 300px;
}

/* Make covers fill the card */
.employee-card .wp-block-cover {
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  position: relative;
  z-index: 1;
}

.employee-card .wp-block-cover__inner-container {
  position: relative !important;
  z-index: 30 !important;
}

/* Default state */
.employee-card-default {
  position: relative;
  z-index: 1;
  opacity: 1;

  .wp-block-cover__inner-container img {
  width: 20px !important;
  height: auto;
  }
}

/* Hover hidden */
.employee-card-hover {
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border-radius: 8px;
  inset: 0;
  opacity: 1;
  position: absolute;
  z-index: 0;
  transition: opacity 0.3s ease-in-out;
}

.employee-read-more {
  margin: 0 !important;
  padding: 0 !important;
  max-height: 0;
  overflow: hidden;
  transform: translateY(10px);

  transition: 
    max-height 0.35s ease,
    margin 0.35s ease,
    transform 0.3s ease;
}

/* Show read more on mobile and tablet by default */
@media (max-width: 1050px) {
  .employee-read-more {
    margin: 16px 0 !important;
    display: block;
    max-height: 100px; 
    opacity: 1;
    transform: translateY(0);
    overflow: visible !important;
  }
}

/* Hover state */
.employee-card:hover .employee-card-hover {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.employee-card:hover .wp-block-cover__image-background {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.employee-card:hover .employee-read-more {
  margin: 16px 0 !important;
  display: block;
  max-height: 100px; 
  opacity: 1;
  transform: translateY(0);
  overflow: visible !important;
}

.employee-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);

  display: none;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

.employee-modal-overlay.active {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.employee-card-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;

  justify-content: center;
  align-items: center;
  padding: 20px;

  img {
    max-width: 300px;
    max-height: 384px;
    object-position: top center;
  }

  .modal-content-left .has-green-background-color img {
    width: 20px !important; 
    height: auto;
  }
}

.employee-card-modal.active {
  display: flex;
  margin: auto;
  width: 1000px;
  height: 527px;
}

.employee-card-modal > * {
  width: 100%;
  max-width: 1100px;

  max-height: 90vh;
  overflow-y: auto;
}

.employee-card-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  z-index: 2;
}

 @media (max-width: 1050px) {
  .employee-card-modal.active {
    width: 90vw;
    height: 65vh;

    .modal-content-left .has-green-background-color {
      .wp-block-columns {
        flex-direction: column;
        .wp-block-column{
          display: block !important;
          flex-basis: 100% !important;
          width: 100% !important;
          flex-grow: 1 !important;
        }
      }
    }
  }
}

@media (max-width: 920px) {
  .modal-content-right {
    align-self: center !important;
    flex-basis: 45% !important;
  }
}

@media (max-width: 781px) {
  .employee-card-modal.active {
    width: 90vw;
    height: 95vh;

    .wp-block-columns {
      padding-right: 10px;
    }

    .wp-block-columns > .wp-block-column:nth-child(1) {
      order: 2;
    }
  
    .wp-block-columns > .wp-block-column:nth-child(2) {
      order: 1;
    }

    img {
      max-width: 100%;
      max-height: 50vh;
    }

    .wp-block-columns::-webkit-scrollbar {
      width: 6px; 
      margin-left: 10px; 
    }
    
    .wp-block-columns::-webkit-scrollbar-track {
      background: transparent;
      margin-top: 35px; 
    }
    
    .wp-block-columns::-webkit-scrollbar-thumb {
      background-color: #00665E;
      border-radius: 999px;
    }
    
    .wp-block-columns::-webkit-scrollbar-thumb:hover {
      background-color: #004f49;
    }
  }
}

 