/* NYVS Phase 1D — adaptive homepage action-card layout
   Presentation only. No route / DB / workflow changes. */

.nyvs-home-builder[data-action-count="1"]{
  width:min(560px,calc(100% - 32px)) !important;
  grid-template-columns:minmax(0,1fr) !important;
}

.nyvs-home-builder[data-action-count="2"]{
  width:min(980px,calc(100% - 32px)) !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}

.nyvs-home-builder[data-action-count="3"]{
  width:min(1120px,calc(100% - 32px)) !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

.nyvs-home-builder[data-action-count="4"]{
  width:min(980px,calc(100% - 32px)) !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}

.nyvs-home-builder[data-action-count="5"]{
  width:min(1120px,calc(100% - 32px)) !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
}
.nyvs-home-builder[data-action-count="5"] > .nyvs-home-action{
  grid-column:span 2 !important;
}
.nyvs-home-builder[data-action-count="5"] > .nyvs-home-action[data-action-index="4"]{
  grid-column:2 / span 2 !important;
}
.nyvs-home-builder[data-action-count="5"] > .nyvs-home-action[data-action-index="5"]{
  grid-column:4 / span 2 !important;
}

.nyvs-home-builder[data-action-count="6"]{
  width:min(1120px,calc(100% - 32px)) !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

.nyvs-home-builder[data-action-count="7"],
.nyvs-home-builder[data-action-count="8"],
.nyvs-home-builder[data-action-count="9"],
.nyvs-home-builder[data-action-count="10"],
.nyvs-home-builder[data-action-count="11"],
.nyvs-home-builder[data-action-count="12"]{
  width:min(1180px,calc(100% - 32px)) !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

/* Make action cards comfortable for older users: clear title, readable description,
   generous hit area, while keeping the original blue/green visual language. */
.nyvs-home-builder > .nyvs-home-action{
  min-height:108px !important;
}
.nyvs-home-builder > .nyvs-home-action strong{
  font-size:22px !important;
  line-height:1.25 !important;
}
.nyvs-home-builder > .nyvs-home-action small{
  font-size:14px !important;
  line-height:1.55 !important;
}

/* Full-width information blocks must continue to span the complete action area. */
.nyvs-home-builder > .nyvs-home-wide,
.nyvs-home-builder > .nyvs-home-text,
.nyvs-home-builder > .nyvs-home-notice{
  grid-column:1 / -1 !important;
}

@media(max-width:900px){
  .nyvs-home-builder[data-action-count]{
    width:calc(100% - 28px) !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .nyvs-home-builder[data-action-count="1"]{
    width:min(560px,calc(100% - 28px)) !important;
    grid-template-columns:1fr !important;
  }
  .nyvs-home-builder[data-action-count="5"] > .nyvs-home-action,
  .nyvs-home-builder[data-action-count="5"] > .nyvs-home-action[data-action-index]{
    grid-column:auto !important;
  }
  .nyvs-home-builder > .nyvs-home-wide,
  .nyvs-home-builder > .nyvs-home-text,
  .nyvs-home-builder > .nyvs-home-notice{
    grid-column:1 / -1 !important;
  }
}

@media(max-width:650px){
  .nyvs-home-builder[data-action-count]{
    grid-template-columns:1fr !important;
  }
  .nyvs-home-builder > .nyvs-home-action,
  .nyvs-home-builder[data-action-count="5"] > .nyvs-home-action[data-action-index]{
    grid-column:auto !important;
  }
  .nyvs-home-builder > .nyvs-home-wide,
  .nyvs-home-builder > .nyvs-home-text,
  .nyvs-home-builder > .nyvs-home-notice{
    grid-column:auto !important;
  }
  .nyvs-home-builder > .nyvs-home-action{
    min-height:96px !important;
  }
}
