/* *, *::before, *::after{
  box-sizing: border-box;
} */
/* Coaches layout: responsive grid that NEVER overlaps and stays centred */
.coaches_container{
  display: grid;

  /* Each column is fixed width, NOT 1fr */
  grid-template-columns: repeat(auto-fit, 230px);

  gap: 18px;

  /* width: 100%; */
  width: min(1100px, 100%);
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 0 16px;

  justify-content: center;  /* centers the entire grid */

  box-sizing: border-box;
}


/* Make the whole card clickable and constrain the card width */
.coach_card_link{
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Card fills the link width (prevents overflow) */
.coach_profile{
  box-sizing: border-box;
  width: 100%;

  background: #ffffff;
  padding: 16px;
  border-radius: 14px;
  box-shadow: rgba(99, 99, 99, 0.18) 0px 2px 8px 0px;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;

  position: relative;
  overflow: hidden; /* stop any visual spill */
}

.coach_profile{
  width: 100%;
  box-sizing: border-box;
}

.coach_card_link:hover .coach_profile{
  box-shadow: rgba(99, 99, 99, 0.22) 0px 6px 14px 0px;
}

/* Image: more square, slightly taller + narrower, head-focused */
.coach_img_wrapper{
  width: 170px;
  height: 170px;
  border-radius: 12px;
  overflow: hidden;
}

.coach_img_wrapper img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%; /* keeps head/face in view */
  display: block;
}

/* Text */
.coach_text{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.coach_text h4{
  font-size: 18px;
  margin: 0;
  color: #262D34;
  margin-bottom: 5px;
}

/* Button slightly taller */
.coach_learn_more{
  font-size: 14px;
  padding: 7px 10px;
  border-radius: 10px;
  line-height: 1;
  margin-top: 10px;
}

/* Safety override: if .main_btn globally adds transforms/margins */
.coach_profile .main_btn{
  margin-top: 0 !important;
  transform: none !important;
}

/* Mobile: keep cards centred and not full width */
@media (max-width: 1020px){
  .coaches_container{
    grid-template-columns: 1fr;
    grid-template-columns: repeat(auto-fit, 240px);

    max-width: 700px;
  }
}

/* Mobile: keep cards centred and not full width */
@media (max-width: 700px){
  .coaches_container{
    grid-template-columns: 1fr;
    grid-template-columns: repeat(auto-fit, 240px);
  }

  .coach_card_link{
    max-width: 260px; /* centred, not edge-to-edge */
  }

  .coach_img_wrapper{
    width: 180px;
    height: 180px;
  }
}
