/* YGYP Tools Section Refresh v1.0.0
   Homepage-only companion patch.
   Keeps the stable homepage plugin untouched. */

@media (min-width:1025px){
  #ygyp-main-site .toolsGrid.ygyp-tools-refreshed{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:18px !important;
    align-items:stretch !important;
  }

  #ygyp-main-site .toolsGrid.ygyp-tools-refreshed > .ygyp-tool-refresh-card{
    display:flex !important;
    flex-direction:column !important;
    grid-column:auto !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:100% !important;
    overflow:hidden !important;
    border-radius:18px !important;
  }

  #ygyp-main-site .toolsGrid.ygyp-tools-refreshed .ygyp-tool-refresh-image-frame{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    height:190px !important;
    min-height:190px !important;
    max-height:190px !important;
    overflow:hidden !important;
    background:#f7f4ee !important;
  }

  #ygyp-main-site .toolsGrid.ygyp-tools-refreshed .ygyp-tool-refresh-image{
    display:block !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    margin:0 auto !important;
  }
}

@media (min-width:1025px) and (max-width:1180px){
  #ygyp-main-site .toolsGrid.ygyp-tools-refreshed .ygyp-tool-refresh-image-frame{
    height:175px !important;
    min-height:175px !important;
    max-height:175px !important;
  }
}

@media (max-width:1024px){
  #ygyp-main-site .toolsGrid.ygyp-tools-refreshed .ygyp-tool-refresh-image{
    object-fit:contain !important;
    object-position:center center !important;
  }
}
