.m-teamMembers__content {
  margin-bottom: 50px; 
}

a.m-teamMembers__card:hover,
a.m-teamMembers__card:active,
a.m-teamMembers__card:focus {
  text-decoration: none;
  color: inherit;
}

.m-teamMembers__card {
  position: relative; 
  overflow: hidden;
  text-decoration: none;
  color: inherit; 
  display: block;
}

.m-teamMembers__card .m-teamMembers__image {
  width: 100%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}

.m-teamMembers__card h5 {
  margin-bottom: 0px;
}

.m-teamMembers__image img {
  width: 100%;
}

.m-teamMembers__card .mobile-details {
  display: grid;
  grid-template-columns: 7fr 1fr;
  column-gap: 12px;
  margin-top: 0;
}

.m-teamMembers__card .mobile-details img {
  position: static;
}

.m-teamMembers__buttons {
  margin-top: 2rem;
}

@media (max-width: 991px) {
  .mobile-row {
    margin: 0 -30px;  
  }
  .m-teamMembers__card div img{ bottom:auto;}
  .m-teamMembers__list  {
    overflow: hidden;  
  }
  
  .m-teamMembers__list .slick-list {
    width: 77.777%; 
    overflow: visible;
  }
  
  .m-teamMembers__list .slick-slide {
    margin: 0 10px; 
  }
  
  .m-teamMembers__list .slick-dots {
    margin: 50px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: start;
  }

  .m-teamMembers__list .slick-dots li {
    width: 30px;
    height: 4px;
    background-color: var(--rose);
    margin: 0 5px;
    border-radius: 10px; 
    position: relative; 
    cursor: pointer;
    opacity: 0.4;
  }
  
  .m-teamMembers__list .slick-dots li.slick-active {
    opacity: 1;
  }

  .m-teamMembers__list .slick-dots li button {
    display: none; 
  }
  
  .o-teamMembers .modal-dialog {
    margin: 0;
    width: 100vw;
    height: 100vh;
  }
  
  .o-teamMembers .modal-content {
    width: 100vw;
    height: 100%;
  }
  
  .o-teamMembers .modal-body {
    padding: 50px 30px; 
  }
  
  .o-teamMembers .modal-body .m-teamMembers__modalImage {
    margin-bottom: 30px; 
  }
  
  .o-teamMembers .modal-body .m-teamMembers__modalImage img {
    width: 60.294%; 
    border-radius: 12px;
  }
  
  .o-teamMembers .modal-body .m-teamMembers__modalContent h3 {
    margin-bottom: 5px; 
  }
  
  .o-teamMembers .modal-body .m-teamMembers__modalContent .subtitle {
    margin-bottom: 30px; 
  }
  
  .o-teamMembers .modal-body .modal-close {
    width: 26px;
    height: 26px;
    position: absolute;
    right: 30px;
    top: 50px;
  }
  
  .o-teamMembers .modal-body .modal-close img {
    width: 100%; 
  }
}

@media (min-width: 992px) {
  .m-teamMembers__card {
    margin-bottom: 30px; 
  }
  
  .m-teamMembers__col.col-lg-custom {
    max-width: 220px;
  }
  
  .m-teamMembers__card .m-teamMembers__image:before { 
    content: "";
    background-color: rgba(101, 0, 68, 0.8);
    background-image: url(https://www.hammond.com.au/hubfs/HammondCare/DC/diagonal-arrow-icon.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 75px;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; 
    opacity: 0;
    margin-top: 0; 
    border-radius: 50%;
    -webkit-transition: all .5s ease;
    transition: all .5s ease;
    cursor: pointer;
  }
  
  .m-teamMembers__card:hover .m-teamMembers__image:before {
    opacity: 1;
    
  }
  
  .m-teamMembers__buttons {
    margin-top: 0;
  }
  
  .o-teamMembers .modal {
    background-color: rgba(160, 31, 97, 0.9);
  }
  
  .o-teamMembers .modal-dialog {
    width: 1170px;
    max-width: calc(100% - 40px); 
    height: 100%;
    display: flex;
    align-items: center; 
    margin: 0 auto;
  }
  
  .o-teamMembers .modal-content {
    border-radius: 12px;
    border: 0; 
    height: auto !important;
  }
  
  .o-teamMembers .modal-body {
    position: relative;
    padding: 100px; 
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
  }
  
  .m-teamMembers__modalImage {
    width: 35.05%; 
  }
  
  .m-teamMembers__modalContent {
    width: 58.55%; 
  }
  
  .o-teamMembers .modal-body h3 {
    margin-bottom: 5px; 
  }
  
  .o-teamMembers .modal-close {
    position: absolute;
    right: 50px;
    top: 50px; 
    cursor: pointer;
  }
  
  .o-teamMembers .modal-body .m-teamMembers__modalImage img {
    border-radius: 12px; 
  }
}

@media (min-width:308px) and (max-width:991px){
.o-teamMembers .modal-content {
    height: auto !important;
    width: 80% !important;
    margin: 0 auto;
    position: relative;
}
}

@media(max-width:991px){

  .o-teamMembers .modal-body{ padding:30px 20px !important;}
  
  .o-teamMembers.-plum .m-teamMembers__card h6, .o-teamMembers.-plum .m-teamMembers__card p,
  .o-teamMembers.-blackberry .m-teamMembers__card h6, .o-teamMembers.-blackberry .m-teamMembers__card p,
  .o-teamMembers.-lilac .m-teamMembers__card h6, .o-teamMembers.-lilac .m-teamMembers__card p {
    color: var(--white);
  }
}

.rotating-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center; /* center the entire sentence */
  align-items: baseline;
  gap: 0.3em;
}

.static-text {
  text-align: right;
  white-space: nowrap;
}

.animated-wrapper {
  overflow: hidden;
  height: 1em;
  position: relative;
  text-align: left;
  min-width: 8ch; /* adjust based on longest word */
}

.animated-list {
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 1s cubic-bezier(0.2, 0.2, 0, 1);
}

.animated-list li {
  height: 1em;
  line-height: 1;
  text-align: left;
  color: #F27721;
}

@media (max-width: 767px) {
  .rotating-grid {
    grid-template-columns: 1fr !important; /* Stack items vertically */
    gap: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .static-text {
    text-align: center;
    justify-self: center;
    margin-bottom: 0.3em;
    width: 100%;
    display: block;
  }
  .animated-wrapper {
    text-align: center;
    justify-self: center;
    width: 100%;
    display: block;
    min-width: unset; /* Remove min-width so it doesn't force left alignment */
  }
  .animated-list li {
    text-align: center;
  }
}

  {# =========== Modal Styles =========== #}
.team-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.team-modal[aria-hidden="false"] {
  display: flex;
}

.team-modal-dialog {
  position: relative;
  max-width: 700px;
  width: 90%;
  z-index: 10000;
  animation: slideUp 0.3s ease-in-out;
  margin: auto;
}
  
  .team-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-in-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  
  @keyframes slideUp {
    from {
      transform: translateY(50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .team-modal-header {
    position: relative;
    padding: 60px 50px 60px 50px;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
  }
  
  .team-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .team-modal-close:hover {
    color: #000;
  }

  
  /* ADD THESE NEW RULES */
  .team-modal-close:focus {
    outline: none;
  }

  .team-modal-close:focus-visible {
    outline: 2px solid #4c9ffe;
    outline-offset: 2px;
    border-radius: 4px;
  }
  
  .team-modal-linkedin:hover {
    opacity: 0.7;
  }
  
  .team-modal-linkedin svg {
    width: 24px;
    height: 24px; 
    fill: var(--mauve);
  }
  
  .team-modal-header-content {
    display: flex;
    align-items: center;
    gap: 60px;
  }
  
  .team-modal-image {
    flex-shrink: 0;
  }
  
  .team-modal-image img {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .team-modal-info {
    flex: 1;
    min-width: 0;
  }
  
  .team-modal-name {
    margin: 0 0 12px 0;
    color: var(--mauve);
  }
  
  .team-modal-divider {
    width: 60px;
    height: 3px;
    background-color: var(--orange);
    margin: 12px 0;
  }
  
  .team-modal-title {
    margin: 12px 0 0 0;
    color: var(--mauve);
  }
  
  .team-modal-body {
    padding: 0px 40px 50px 40px;
    background-color: #ffffff;
    border-radius: 0 0 12px 12px;
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .team-modal-description {
    color: var(--mauve);
    margin: 0;
  }
  
  .team-modal-description p {
    margin-bottom: 16px;
  }
  
  .team-modal-description p:last-child {
    margin-bottom: 0;
  }

   @media (max-width: 767px) {
    .team-modal-dialog {
      width: 95%;
      margin: 1rem auto;
    }
    
    .team-modal-header {
      padding: 30px 24px 24px 24px;
    }
    
    .team-modal-header-content {
      flex-direction: column;
      align-items: flex-start;
      gap: 20px;
    }
    
    .team-modal-image img {
      width: 120px;
      height: 120px;
    }
    
  }
  
  /* Prevent body scroll when modal is open */
  body.modal-open {
    overflow: hidden;
  }

  /* Decorative circles behind modal image */
.team-modal-image {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.team-modal-image::before,
.team-modal-image::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (min-width: 992px) {
  /* First circle - orange/rose */
  .team-modal-image::before {
    width: 90px;
    height: 90px;
    background-color: var(--orange, #F27721);
    top: -20px;
    left: -30px;
    animation: orbit1 2s ease-in-out;
  }

  /* Second circle - blush/pink */
  .team-modal-image::after {
    width: 45px;
    height: 45px;
    background-color: var(--rose, #FFB6C1);
    bottom: -15px;
    right: -25px;
    animation: orbit2 2s ease-in-out;
  }

  /* Show circles when modal is open */
  .team-modal[aria-hidden="false"] .team-modal-image::before,
  .team-modal[aria-hidden="false"] .team-modal-image::after {
    opacity: 0.3;
  }
}

/* Orbit animation for first circle */
@keyframes orbit1 {
  0% {
    transform: translate(-15px, 15px) scale(1);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Orbit animation for second circle */
@keyframes orbit2 {
  0% {
    transform: translate(15px, -15px) scale(1);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .team-modal-image::before {
    width: 80px;
    height: 80px;
    top: -15px;
    left: -20px;
  }
  
  .team-modal-image::after {
    width: 60px;
    height: 60px;
    bottom: -10px;
    right: -15px;
  }
}

.team-modal-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.team-modal-body {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}