/* V3.0.1 — Cloud tournament cards: restore compact 4/3/2 layout on home + events page. */

/* Home Cloud markup used a new wrapper name. Keep both classes compatible with the approved V2.7 layout. */
body.home .tournament-grid,
body.home .tour-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:clamp(10px,1vw,16px)!important;
  width:100%!important;
  min-width:0!important;
}
body.home .tournament-grid .tour-card,
body.home .tour-grid .tour-card{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:230px!important;
}
body.home .tournament-grid .tour-card-content,
body.home .tour-grid .tour-card-content{
  min-height:230px!important;
  padding:14px!important;
}
body.home .tournament-grid .tour-card h3,
body.home .tour-grid .tour-card h3{
  font-size:14px!important;
  line-height:1.28!important;
  margin:12px 0 5px!important;
}
body.home .tournament-grid .tour-details,
body.home .tour-grid .tour-details{
  font-size:9px!important;
  line-height:1.45!important;
}
body.home .tournament-grid .tour-cta,
body.home .tour-grid .tour-cta{
  font-size:8.5px!important;
  padding:8px 10px!important;
}

/* Cloud events page is a normal WP Page now, not a CPT archive, so old archive-only selectors never fired. */
.cloud-events-page .card-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:clamp(10px,1vw,16px)!important;
  align-items:stretch!important;
  width:100%!important;
}
.cloud-events-page .card{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-width:0!important;
  width:100%!important;
  border-radius:14px!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,#17324a 0%,#132c42 100%)!important;
  border:1px solid rgba(100,151,186,.55)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.18)!important;
}
.cloud-events-page .card-photo{
  display:block!important;
  height:180px!important;
  min-height:180px!important;
  max-height:180px!important;
  overflow:hidden!important;
  background:#102335!important;
}
.cloud-events-page .card-photo img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
}
.cloud-events-page .card-content{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  padding:13px 14px 12px!important;
  min-height:0!important;
}
.cloud-events-page .card-content .eyebrow{
  display:block!important;
  margin:0 0 7px!important;
  min-height:12px!important;
  font-size:8.5px!important;
  letter-spacing:.15em!important;
  color:#d8c08a!important;
}
.cloud-events-page .card-content h3{
  width:100%!important;
  min-height:43px!important;
  margin:0 0 7px!important;
  font-size:15px!important;
  line-height:1.27!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}
.cloud-events-page .card-content h3 a{color:#f4f8fc!important}
.cloud-events-page .card-meta{
  width:100%!important;
  display:grid!important;
  gap:5px!important;
  min-height:42px!important;
  margin:0!important;
  color:#d6e2ec!important;
  font-size:10px!important;
}
.cloud-events-page .card-bottom{
  width:100%!important;
  margin-top:auto!important;
  padding-top:10px!important;
  border-top:1px solid rgba(117,154,183,.28)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:7px!important;
}
.cloud-events-page .card-bottom .chip{
  min-height:28px!important;
  padding:6px 8px!important;
  font-size:8.5px!important;
  background:#32455b!important;
  color:#eef6ff!important;
  border:1px solid #7591a2!important;
}
.cloud-events-page .card-bottom .text-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:29px!important;
  padding:7px 10px!important;
  border-radius:6px!important;
  background:#eaff36!important;
  color:#071a2f!important;
  font-size:8.5px!important;
  font-weight:800!important;
  text-decoration:none!important;
}

@media(max-width:1180px){
  body.home .tournament-grid,body.home .tour-grid,
  .cloud-events-page .card-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
  body.home .tournament-grid,body.home .tour-grid,
  .cloud-events-page .card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .cloud-events-page .card-photo{height:145px!important;min-height:145px!important;max-height:145px!important}
  .cloud-events-page .card-content{padding:10px!important}
  .cloud-events-page .card-content h3{min-height:38px!important;font-size:12.5px!important}
  .cloud-events-page .card-meta{min-height:38px!important;font-size:9px!important}
  body.home .tournament-grid .tour-card,body.home .tour-grid .tour-card,
  body.home .tournament-grid .tour-card-content,body.home .tour-grid .tour-card-content{min-height:205px!important}
}
@media(max-width:420px){
  body.home .tournament-grid,body.home .tour-grid,
  .cloud-events-page .card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .cloud-events-page .card-photo{height:118px!important;min-height:118px!important;max-height:118px!important}
  .cloud-events-page .card-content{padding:9px!important}
  .cloud-events-page .card-content .eyebrow{font-size:7.5px!important}
  .cloud-events-page .card-content h3{min-height:34px!important;font-size:11.5px!important}
  .cloud-events-page .card-meta{font-size:8.5px!important;min-height:34px!important}
  .cloud-events-page .card-bottom{gap:5px!important}
  .cloud-events-page .card-bottom .chip,.cloud-events-page .card-bottom .text-link{font-size:7.5px!important;padding:6px 7px!important;min-width:0!important}
}
