.home-hero {
  position: relative;
  min-height: 500px;
  margin-bottom: 0;
  padding-bottom: 40px;
  background-image: url("../image/home/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: visible;
  overflow-x: clip;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 16, 114, 0.72) 0%, rgba(9, 35, 87, 0.40) 100%);
  pointer-events: none;
}

.home-hero__container {
  position: relative;
  z-index: 2;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-left: var(--page-padding-x);
  padding-right: var(--page-padding-x);
  padding-top: 40px;
  padding-bottom: 164px;
  box-sizing: border-box;
}

.home-hero__content {
  margin-top: 90px;
  margin-bottom: 48px;
  max-width: 700px;
}

.home-hero__title {
  color: var(--text-color-invert, #FFF);
  text-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
  font-family: var(--Display-Large-Font, "Plus Jakarta Sans"), sans-serif;
  font-size: var(--Display-Large-Size, 44px);
  font-style: normal;
  font-weight: 600;
  line-height: 110%;
  letter-spacing: var(--Display-Large-Tracking, 0);
}

.home-hero__description {
  margin-top: 24px;
  max-width: 720px;
  color: var(--text-color-invert, #FFF);
  text-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 600;
  line-height: 130%;
}

.home-hero__cards {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: absolute;
  bottom: -30%;
  left: var(--page-padding-x);
  right: var(--page-padding-x);
  z-index: 3;
  padding-top: 100px;
}

.hero-card {
  position: relative;
  min-height: 140px;
  padding: 48px 20px 24px;
  border-radius: 16px;
  background: var(--fill-general-white, #FFF);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card__icon {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: 74px;
  height: 74px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 100px;
}

.hero-card__icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.hero-card__text {
  text-align: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
}

.hero-card--buscar {
  border-top: 4px solid var(--Blue-gradient, #10A9D3);
  box-shadow: 0 1px 24px -3px rgba(16, 169, 211, 0.20);
}

.hero-card--buscar:hover {
  box-shadow: 0 1px 24px -3px rgba(16, 169, 211, 0.60);
}

.hero-card__icon--buscar {
  background: var(--fill-general-blue-minimal, #E8F7FB);
}

.hero-card__text--buscar {
  color: var(--text-color-highlight-primary, #1A7FC1);
}

.hero-card--catalogo {
  border-top: 4px solid var(--Green-gradient, #17CA88);
  box-shadow: 0 1px 24px -3px rgba(23, 202, 136, 0.20);
}

.hero-card--catalogo:hover {
  box-shadow: 0 1px 24px -3px rgba(23, 202, 136, 0.60);
}

.hero-card__icon--catalogo {
  background: var(--fill-general-green-minimal, #E8FAF4);
}

.hero-card__text--catalogo {
  color: var(--text-color-highlight-green, #0EA780);
}

.hero-card--portal {
  border-top: 4px solid #EE7748;
  box-shadow: 0 1px 24px -3px rgba(246, 180, 88, 0.20);
}

.hero-card--portal:hover {
  box-shadow: 0 1px 24px -3px rgba(246, 180, 88, 0.60);
}

.hero-card__icon--portal {
  background: #FFF8EF;
}

.hero-card__text--portal {
  color: #F29751;
}

.hero-card--normas {
  border-top: 4px solid var(--Purple-gradient, #B65DAF);
  box-shadow: 0 1px 24px -3px rgba(182, 93, 175, 0.20);
}

.hero-card--normas:hover {
  box-shadow: 0 1px 24px -3px rgba(182, 93, 175, 0.60);
}

.hero-card__icon--normas {
  background: var(--fill-general-purple-minimal, #F8EFF7);
}

.hero-card__text--normas {
  color: var(--text-color-highlight-purple, #974DAC);
}

@media (max-width:900px){

  .home-hero__container{
    padding: 0;
    max-width: 100%;
    overflow: hidden;
    z-index: auto;
  }

  .home-hero{
    min-height: unset;
    margin-bottom: 0;
    padding-bottom: 0;
    background-image: none;
    overflow: hidden;
  }

  .home-hero__cards{
    position: static;
    z-index: 3;
  }

  .home-hero__content{
    margin-top:0;
    margin-bottom: 0;
    padding:120px 24px 140px;
    max-width: 100%;

    background-image: url("../image/home/background-mobile.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .home-hero__title{
    font-size:32px;
  }

  .home-hero__description{
    font-size:16px;
  }

  .hero-card{
    min-height:120px;
  }

}

/* ===== how-it-works slots dentro do hero (desktop default) ===== */
.home-hero__cards .how-it-works__slot {
  flex: 1 1 0;
  position: relative;
  padding-right: 24px;
  display: flex;
  align-items: flex-end;
  height: 170px;
}

.home-hero__cards .how-it-works__slot--last {
  padding-right: 0;
}

.home-hero__cards .how-it-works__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1px solid #1065D3;
  background: linear-gradient(90deg, rgba(16, 101, 211, 0.10) 0%, rgba(38, 83, 174, 0.10) 100%), #FFF;
  box-sizing: border-box;
  overflow: visible;
  position: relative;
  text-align: left;
}

.home-hero__cards button.how-it-works__card--clickable {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

/* Topo do card: avatar + número */
.home-hero__cards .how-it-works__card-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 12px;
  height: 56px;
  flex-shrink: 0;
}

.home-hero__cards .how-it-works__avatar {
  display: block;
  flex-shrink: 0;
  transform: translateY(18%);
  margin-left: -15px;
}

.home-hero__cards .how-it-works__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2653AE;
  color: #FFF;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 4px;
  margin-bottom: 4px;
}

/* Corpo do card: título + descrição */
.home-hero__cards .how-it-works__card-body {
  padding: 0;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-hero__cards .how-it-works__card-title {
  color: #214793;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin: 0;
}

.home-hero__cards .how-it-works__card-description {
  color: #214793;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
  margin: 0;
  width: 75%;
}

/* Setas entre os cards */
.home-hero__cards .how-it-works__arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  z-index: 2;
  pointer-events: none;
}

.home-hero__cards .how-it-works__arrow--down {
  transform: translate(40%, 15%) rotate(0deg);
}

.home-hero__cards .how-it-works__arrow--up {
  transform: translate(50%, -50%) scaleY(-1);
}

/* ===== Desktop pequeno (901–1100px): cards menores, texto adaptado ===== */
@media (min-width: 901px) and (max-width: 1100px) {
  .home-hero__container {
    padding-bottom: 140px;
  }

  .home-hero__content {
    margin-top: 60px;
  }

  .home-hero__title {
    font-size: 36px;
  }

  .home-hero__description {
    font-size: 18px;
  }

  .home-hero__cards .how-it-works__slot {
    padding-right: 16px;
  }

  .home-hero__cards .how-it-works__card-title {
    font-size: 14px;
  }

  .home-hero__cards .how-it-works__card-description {
    font-size: 12px;
    width: 90%;
  }

  .home-hero__cards .how-it-works__number {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
}

/* ===== Mobile/Tablet (≤900px): carrossel horizontal ===== */
@media (max-width: 900px) {
  .home-hero__cards {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    bottom: 0;
    padding: 140px 0 16px 24px;
    margin-top: -160px;
    gap: 0;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 24px;
    max-width: 100%;
  }

  .home-hero__cards::-webkit-scrollbar {
    display: none;
  }

  .home-hero__cards .how-it-works__slot {
    flex: 0 0 calc(90% - 24px);
    min-width: 0;
    scroll-snap-align: start;
    padding-right: 24px;
    padding-top: 0;
    height: 170px;
  }

  .home-hero__cards .how-it-works__slot--last {
    padding-right: 24px;
  }

  .home-hero__cards .how-it-works__card {
    height: 100%;
  }

  .home-hero__cards .how-it-works__card-body {
    padding: 12px 16px 24px;
  }

  .home-hero__cards .how-it-works__avatar {
    width: auto;
  }

  .home-hero__cards .how-it-works__arrow {
    display: block;
  }
}

/* ===== Tablet (601–900px): 2 cards visíveis por vez ===== */
@media (min-width: 601px) and (max-width: 900px) {
  .home-hero__cards .how-it-works__slot {
    flex: 0 0 calc(50% - 24px);
  }
}

/* ===== Mobile (≤600px): 1 card visível por vez ===== */
@media (max-width: 600px) {
  .home-hero__cards .how-it-works__slot {
    flex: 0 0 calc(85%);
  }
}
