/* AtendePraVocê — Premium components v5 / Home hero final spacing
   Incremental over Premium Light v6. Scope: Home operational cards only.
   Goal: remove inherited floating/offset behavior and guarantee real spacing. */

/* Desktop: clean 2x2 grid, no overlap, no inherited float animation. */
body.page-home .hero-visual-wrap {
  min-height: 470px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: center !important;
  align-items: stretch !important;
  column-gap: 46px !important;
  row-gap: 42px !important;
  padding: 38px 8px !important;
  overflow: visible !important;
}

body.page-home .hero-visual-wrap > .hv-card,
body.page-home .hero-visual-wrap > .hv-card.c1,
body.page-home .hero-visual-wrap > .hv-card.c2,
body.page-home .hero-visual-wrap > .hv-card.c3,
body.page-home .hero-visual-wrap > .hv-card.c4 {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 136px !important;
  margin: 0 !important;
  padding: 23px 24px !important;
  transform: none !important;
  animation: none !important;
  align-self: stretch !important;
}

body.page-home .hero-visual-wrap > .hv-card:hover {
  transform: translateY(-2px) !important;
}

body.page-home .hero-visual-wrap .hvc-top {
  margin-bottom: 18px !important;
}

/* Full-width tablet layout keeps 2 columns but reduces the gap proportionally. */
@media (max-width: 980px) and (min-width: 701px) {
  body.page-home .hero-visual-wrap {
    min-height: auto !important;
    column-gap: 30px !important;
    row-gap: 30px !important;
    padding: 30px 4px !important;
  }

  body.page-home .hero-visual-wrap > .hv-card,
  body.page-home .hero-visual-wrap > .hv-card.c1,
  body.page-home .hero-visual-wrap > .hv-card.c2,
  body.page-home .hero-visual-wrap > .hv-card.c3,
  body.page-home .hero-visual-wrap > .hv-card.c4 {
    min-height: 126px !important;
    padding: 21px 22px !important;
  }
}

/* Narrow tablet: one card per row; spacing is physical, never transform-based. */
@media (max-width: 700px) and (min-width: 641px) {
  body.page-home .hero-visual-wrap {
    grid-template-columns: 1fr !important;
    row-gap: 20px !important;
    padding: 24px 0 !important;
  }

  body.page-home .hero-visual-wrap > .hv-card,
  body.page-home .hero-visual-wrap > .hv-card.c1,
  body.page-home .hero-visual-wrap > .hv-card.c2,
  body.page-home .hero-visual-wrap > .hv-card.c3,
  body.page-home .hero-visual-wrap > .hv-card.c4 {
    min-height: 116px !important;
  }
}

/* Mobile: horizontal snap rail with a visibly larger gutter between cards. */
@media (max-width: 640px) {
  body.page-home .hero-visual-wrap {
    width: calc(100% + 32px) !important;
    min-height: 0 !important;
    margin-inline: -16px !important;
    padding: 22px 16px 16px !important;
    display: flex !important;
    align-items: stretch !important;
    gap: 20px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 16px !important;
    overscroll-behavior-inline: contain !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.page-home .hero-visual-wrap::-webkit-scrollbar {
    display: none;
  }

  body.page-home .hero-visual-wrap > .hv-card,
  body.page-home .hero-visual-wrap > .hv-card.c1,
  body.page-home .hero-visual-wrap > .hv-card.c2,
  body.page-home .hero-visual-wrap > .hv-card.c3,
  body.page-home .hero-visual-wrap > .hv-card.c4 {
    flex: 0 0 min(84vw, 326px) !important;
    width: min(84vw, 326px) !important;
    min-width: min(84vw, 326px) !important;
    min-height: 122px !important;
    padding: 20px 21px !important;
    margin: 0 !important;
    transform: none !important;
    animation: none !important;
    scroll-snap-align: center !important;
  }

  body.page-home .hero-visual-wrap > .hv-card:hover {
    transform: none !important;
  }
}
