/* ==========================================================================
   Team module — "Over ons", kaartraster in CutWise-stijl
   Hook: sectie custom_class 'bmtec-team', kolom custom_class 'team-card'
   ========================================================================== */

/* Raster: flex-wrap i.p.v. de Enfold-kolomfloats */
#top .bmtec-team .entry-content-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  max-width: 1320px;
  margin: 0 auto;
  float: none;
}

/* Sectiekop over de volle breedte */
#top .bmtec-team .entry-content-wrapper > .av_textblock_section {
  flex: 0 0 100%;
  margin: 0 0 20px;
  text-align: center;
}

#top .bmtec-team .team-title {
  margin: 0;
}

/* Kaart */
/* Flexibele basis i.p.v. vast 310px: zo passen er in elke Enfold-container
   (desktop ~970px, tablet ~630px, mobiel ~270px) zoveel kaarten als er in gaan,
   zonder dat er een halve rij overblijft. */
#top .bmtec-team .team-card {
  flex: 1 1 280px;
  width: auto;
  min-width: 0;
  max-width: 340px;
  margin: 0;
  padding: 0 0 16px;
  float: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 15px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* Foto */
#top .bmtec-team .team-card .avia-image-container,
#top .bmtec-team .team-card .avia-image-container-inner,
#top .bmtec-team .team-card .avia-image-overlay-wrap {
  margin: 0;
  display: block;
}

#top .bmtec-team .team-card .avia_image {
  display: block;
  width: 100%;
  height: 262px;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
}

/* Tekstkolom vult de resterende hoogte, zodat de knop onderaan uitlijnt */
#top .bmtec-team .team-card .av_textblock_section {
  display: flex;
  flex: 1 1 auto;
  margin: 0;
}

#top .bmtec-team .team-card .avia_textblock {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
}

/* Naam in de tekstkleur i.p.v. Enfold's rode kopkleur — rood blijft voor de knop.
   #wrap_all is nodig om '#top #wrap_all .all_colors h3' uit Enfold te verslaan. */
#top #wrap_all .bmtec-team .team-card__name {
  margin: 10px 0 0;
  padding: 6px 20px 8px;
  color: #2a2a2a;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 600;
  text-transform: none;
}

#top .bmtec-team .team-card__role {
  margin: 0;
  padding: 0 20px 10px;
  color: #6d6d6d;
  font-size: 16px;
  line-height: 1.5;
}

/* margin-top:auto duwt de knop naar de onderkant van de kaart */
#top .bmtec-team .team-card__contact {
  margin: auto 0 0;
  padding: 6px 20px 0;
}

/* Mailknop — CutWise-vorm, BMTEC-rood */
#top .bmtec-team .team-card__mail {
  display: inline-block;
  min-width: 140px;
  padding: 8px 16px;
  border: 1px solid #d90200;
  border-radius: 8px;
  background: transparent;
  color: #d90200;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

#top .bmtec-team .team-card__mail:hover,
#top .bmtec-team .team-card__mail:focus {
  background-color: #d90200;
  color: #fff;
}

/* De contentbreedte is ongeveer (viewport - 115px). Met een basis van 280px past
   er tussen ~990 en ~1010px net geen derde kaart meer, waardoor het raster daar
   naar twee kolommen terugvalt. Een kleinere basis houdt het aantal kolommen
   monotoon aflopend richting mobiel. */
@media only screen and (min-width: 768px) and (max-width: 1010px) {
  #top .bmtec-team .team-card {
    flex: 1 1 240px;
  }
}

@media only screen and (max-width: 767px) {
  /* Kaart mag meegroeien met de container i.p.v. vast 250px, anders blijven er
     op een telefoon brede lege marges naast de kaart staan. */
  #top .bmtec-team .team-card {
    flex: 1 1 250px;
    max-width: none;
    padding-bottom: 8px;
  }

  #top .bmtec-team .team-card .avia_image {
    height: 210px;
  }
}
