/* Homepage-only layout fixes for the public hidden-club redesign. */

/* Top rated: deterministic layout. PHP only supplies the five items; CSS owns layout. */
#top-members-trigger .portfolio_content .row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  margin: 0 auto !important;
  padding: 0 18px 28px !important;
  max-width: 1180px;
}

#top-members-trigger .portfolio_content .row > .col-md-1 {
  display: none !important;
}

#top-members-trigger .portfolio_content .row > .col-md-2 {
  float: none !important;
  clear: none !important;
  width: 20% !important;
  flex: 0 0 20% !important;
  max-width: 20% !important;
  margin: 0 !important;
  padding: 0 9px 18px !important;
  box-sizing: border-box !important;
}

#top-members-trigger .portfolio_single_content {
  width: 100% !important;
  height: 180px !important;
  margin: 0 !important;
  overflow: hidden;
  background: #0d0909 !important;
  border: 1px solid rgba(197,161,107,.22);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}

#top-members-trigger .portfolio_single_content img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  position: static !important;
  display: block;
  margin: 0 !important;
}

#top-members-trigger .portfolio_content h4 {
  color: #ead8c1 !important;
  text-align: center;
  margin: 0 0 10px !important;
  font-size: 17px;
}

/* Top lists: old float-based icon layout becomes a centered tile layout. */
body > .body > .rotate-box-1-wrapper .row {
  display: flex;
  flex-wrap: wrap;
}

body > .body > .rotate-box-1-wrapper .row > [class*="col-"] {
  float: none !important;
}

body > .body > .rotate-box-1-wrapper a.rotate-box-1 {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 190px;
  margin: 12px 0 !important;
  padding: 14px 12px 18px;
  text-align: center;
}

body > .body > .rotate-box-1-wrapper .rotate-box-icon {
  float: none !important;
  flex: 0 0 auto;
  margin: 0 0 16px !important;
}

body > .body > .rotate-box-1-wrapper .rotate-box-info {
  width: 100%;
  padding-left: 0 !important;
  text-align: center;
}

body > .body > .rotate-box-1-wrapper .rotate-box-info h4 {
  margin: 0 0 8px !important;
}

body > .body > .rotate-box-1-wrapper .rotate-box-info p {
  margin: 0 auto !important;
  max-width: 260px;
}

@media (max-width: 767px) {
  #top-members-trigger .portfolio_content .row {
    justify-content: flex-start !important;
    padding: 0 8px 24px !important;
  }

  #top-members-trigger .portfolio_content .row > .col-md-2 {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 7px 18px !important;
  }

  #top-members-trigger .portfolio_single_content {
    height: 150px !important;
  }

  #top-members-trigger .portfolio_content h4 {
    min-height: 20px;
    margin: 0 0 8px !important;
    font-size: 14px;
    line-height: 20px;
  }

  body > .body > .rotate-box-1-wrapper .row {
    display: block;
  }

  body > .body > .rotate-box-1-wrapper .row > [class*="col-"] {
    width: 100% !important;
    padding-left: 18px;
    padding-right: 18px;
  }

  body > .body > .rotate-box-1-wrapper a.rotate-box-1 {
    min-height: 0;
    margin: 4px 0 10px !important;
    padding: 14px 10px 18px;
  }

  body > .body > .rotate-box-1-wrapper .rotate-box-icon {
    margin-bottom: 12px !important;
  }
}
