.esc-tournament-grid{
  display:grid;
  gap:var(--wp--style--block-gap, 28px);
  margin:28px 0;
}

.esc-cols-1{grid-template-columns:repeat(1,minmax(0,1fr));}
.esc-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
.esc-cols-3{grid-template-columns:repeat(3,minmax(0,1fr));}
.esc-cols-4{grid-template-columns:repeat(4,minmax(0,1fr));}

.esc-tournament-card{
  box-sizing:border-box;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  height:100%;
}

.esc-card-body{
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  flex:1;
}

.esc-card-body > .wp-block-buttons:last-child,
.esc-card-body > .wp-block-group:last-child,
.esc-card-body > .esc-tournament-link-button:last-child{
  margin-top:auto;
}

.esc-tournament-image{
  position:relative;
  box-sizing:border-box;
}

.esc-tournament-image .wp-block-cover__inner-container{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.esc-tournament-logo{
  max-width:70%;
  max-height:170px;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}



.esc-tournament-title a,
.esc-tournament-location a,
.esc-tournament-contact-email a{
  color:inherit;
}

.esc-tournament-meta,
.esc-tournament-gender,
.esc-tournament-age-groups{
  margin-top:0;
}

.esc-pricing-table{
  margin:0;
  padding:0;
}

.esc-pricing-row{
  margin:0 0 .5em;
}

.esc-pricing-row:last-child{
  margin-bottom:0;
}

.esc-tournament-link-button{
  display:inline-block;
}

@media(max-width:900px){
  .esc-cols-2,
  .esc-cols-3,
  .esc-cols-4{
    grid-template-columns:1fr;
  }
}

/* Keep native Gutenberg typography and link-color controls on dynamic content.
   Linked titles, locations and email addresses should inherit the block's
   text decoration, font appearance and alignment instead of theme link rules. */
.esc-tournament-title > a,
.esc-tournament-location > a,
.esc-tournament-contact-email > a {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration-line: inherit;
  text-decoration-style: inherit;
  text-decoration-color: inherit;
}

/* A link-color choice takes precedence over the block's text color. */
.esc-tournament-title[style*="--wp--style--color--link"] > a,
.esc-tournament-location[style*="--wp--style--color--link"] > a,
.esc-tournament-contact-email[style*="--wp--style--color--link"] > a {
  color: var(--wp--style--color--link);
}

/* Dynamic pricing rows inherit the wrapper's typography controls. */
.esc-tournament-pricing .esc-pricing-row,
.esc-tournament-pricing .esc-pricing-row span {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: inherit;
}
