/*
  Market Carousel Section:
  - bloco visual inserido antes de Services
  - estética streaming com carrossel horizontal infinito
  - animação contínua com trilha duplicada
*/

.market-carousel-section {
  position: relative;
  overflow: hidden;
  padding: 3.8rem 0 4.2rem;
  height: 50vw;
  background: radial-gradient(120% 140% at 15% 10%, rgb(255 255 255), rgba(10, 24, 30, 0) 45%), linear-gradient(182deg, #ffffff 0%, #10283159 52%, #0d1f26 100%);
}

/*
  Linha decorativa aplicada como pseudo-elemento:
  meia-lua com curvatura para o sentido superior.
*/
.market-carousel-section::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 0px;
  transform: translateX(-50%);
  width: 100vw;
  height: 58px;
  border-top: 2px solid rgba(45, 194, 166, 0.8);
  border-left: 2px solid rgba(45, 194, 166, 0.2);
  border-right: 2px solid rgba(45, 194, 166, 0.2);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: radial-gradient(110% 200% at 50% 100%, rgba(45, 194, 166, 0.32) 0%, rgba(45, 194, 166, 0.12) 42%, rgba(45, 194, 166, 0) 72%);
  box-shadow: 0 -8px 24px rgba(45, 194, 166, 0.22), inset 0 8px 14px rgba(175, 255, 241, 0.16);
  pointer-events: none;
}


/*
  Linha decorativa superior com curvatura e profundidade
  inspirada no comportamento visual solicitado.
*/
.default-ltr-iqcdef-cache-1f97ztc {
  display: none;
}

.market-carousel-section__container {
  width: min(1500px, 96vw);
  margin: 0 auto;
}

.market-carousel-section__header {
  margin: 0 0 1.6rem;
  margin-top: 5vw;
  text-align: center;
  width: min(900px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.market-carousel-section__kicker {
  margin: 0 0 0.35rem;
  color: rgb(68 139 127);
  font-size: 2.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.market-carousel-section__header h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: #000000;
  font-size: clamp(1.5rem, 2.4vw, 2.35rem);
  line-height: 1.15;
  max-width: none;
  text-shadow: 0 8px 22px rgba(4, 10, 12, 0.36);
  transition: transform 0.3s ease, text-shadow 0.3s ease, color 0.3s ease;
}

.market-carousel-section__header h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.6rem;
  width: min(220px, 68%);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(45, 194, 166, 0), rgba(45, 194, 166, 0.6), rgba(45, 194, 166, 0));
  opacity: 0.9;
}

.market-carousel-section__header h2:hover {
  transform: translateY(-2px);
  color: #f2fffc;
  text-shadow: 0 12px 26px rgba(8, 19, 21, 0.44);
}

.market-carousel {
  position: relative;
  overflow: hidden;
  margin-top: 10vw;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  cursor: grab;
  touch-action: pan-y;
}

.market-carousel__track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: marketCarouselScroll 100s linear infinite;
  will-change: transform;
}

.market-carousel.is-dragging {
  cursor: grabbing;
}

.market-carousel.is-dragging .market-card {
  pointer-events: none;
}

.market-carousel.market-carousel--interactive .market-carousel__track {
  animation: none;
}

.market-carousel__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: clamp(0.7rem, 1vw, 1rem);
  width: max-content;
  padding-right: clamp(0.7rem, 1vw, 1rem);
  margin-top: 1vw;
}

.market-carousel__item {
  flex: 0 0 auto;
  width: clamp(210px, 16vw, 280px);
}

.market-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0e2029;
  border: 1px solid rgba(170, 247, 234, 0.14);
  box-shadow: 0 12px 30px rgba(5, 13, 18, 0.34);
  transition: transform 0.32s ease, box-shadow 0.32s ease, filter 0.32s ease, border-color 0.32s ease;
}

.market-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.market-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 10, 16, 0.88) 0%, rgba(2, 10, 16, 0.66) 26%, rgba(2, 10, 16, 0.18) 58%, rgba(2, 10, 16, 0.02) 100%),
    linear-gradient(180deg, rgba(5, 14, 20, 0.08) 0%, rgba(5, 14, 20, 0.24) 100%);
  pointer-events: none;
}

.market-card span {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.7rem;
  z-index: 2;
  color: #ecfffa;
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
  padding: 0.22rem 0.45rem;
  border-radius: 8px;
  background: linear-gradient(270deg, #2dc2a600, #000000b0 58%, #000000 100%);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/*
  Variações sutis por nicho para evitar repetição visual
  usando mesmo asset base.
*/
.market-card--health img { object-position: 52% 35%; }
.market-card--industry img { object-position: 62% 48%; }
.market-card--finance img { object-position: 44% 55%; }
.market-card--retail img { object-position: 58% 42%; }
.market-card--logistics img { object-position: 34% 46%; }
.market-card--education img { object-position: 68% 45%; }
.market-card--public img { object-position: 50% 60%; }
.market-card--services img { object-position: 38% 58%; }

.market-card:hover {
  transform: translateY(-6px) scale(1.03);
  filter: brightness(1.05);
  border-color: rgba(45, 194, 166, 0.4);
  box-shadow: 0 20px 38px rgba(7, 19, 25, 0.52);
}

.market-card:hover::before {
  background:
    linear-gradient(0deg, rgba(2, 10, 16, 0.96) 0%, rgba(2, 10, 16, 0.8) 36%, rgba(2, 10, 16, 0.3) 64%, rgba(2, 10, 16, 0.05) 100%),
    linear-gradient(180deg, rgba(5, 14, 20, 0.12) 0%, rgba(5, 14, 20, 0.34) 100%);
}

.market-card:hover img {
  transform: scale(1.06);
  filter: contrast(1.08) saturate(1.06);
}

@keyframes marketCarouselScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .market-carousel-section {
    padding: 3.4rem 0 3.7rem;
  }

  .market-carousel__item {
    width: clamp(180px, 28vw, 240px);
  }
}

@media (max-width: 760px) {
  .market-carousel-section {
    padding: 3rem 0 3.2rem;
  }

  .market-carousel-section::before {
    width: min(700px, 92vw);
    height: 46px;
    top: -20px;
  }

  .market-carousel-section__header {
    margin-bottom: 1.15rem;
  }

  .market-carousel-section__header h2 {
    max-width: none;
  }

  .market-carousel__item {
    width: clamp(170px, 52vw, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-carousel {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .market-carousel__track {
    animation: none;
  }

  .market-carousel__list[aria-hidden="true"] {
    display: none;
  }

  .market-card,
  .market-card img {
    transition: none;
  }

  .market-card:hover,
  .market-card:hover img {
    transform: none;
    filter: none;
  }
}
