:root {
  --carousel-height: 650px;
  /* antes 530px - aumentado para melhor visualização no desktop */
  --carousel-radius: 18px;
  --carousel-bg: #111;
  --carousel-accent: #ff2f74;
  --carousel-accent-glow: 255 47 116;
  --carousel-text: #fff;
  --carousel-dot-size: 12px;
  --carousel-transition: .65s cubic-bezier(.66, .01, .27, 1);
  --carousel-fade-speed: .9s;
  --shadow-soft: 0 8px 28px -6px rgba(0, 0, 0, .45), 0 4px 12px -2px rgba(0, 0, 0, .3);
  --carousel-padding: 1.2rem;
  --caption-bg: rgba(0, 0, 0, .42);
  --caption-radius: 10px;
}

/* Container */
.carousel {
  position: relative;
  width: 100%;
  height: var(--carousel-height);
  overflow: hidden;
  border-radius: var(--carousel-radius);
  background: linear-gradient(135deg, #1b1b1b 0%, #0d0d10 60%);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
  display: block;
}

/* subtil glow (menos intrusivo) */
.carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(var(--carousel-accent-glow)/0.12), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(var(--carousel-accent-glow)/0.08), transparent 55%);
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: screen;
}

/* track / slides */
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform var(--carousel-transition);
  will-change: transform;
}

.carousel-track.dragging {
  cursor: grabbing;
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: clamp(.75rem, 2.2vw, 2rem);
  color: var(--carousel-text);
  overflow: hidden;
}

/* Ajuste específico para garantir melhor enquadramento em desktop */
@media (min-width:1024px) {
  .slide {
    background-position: center top;
    /* prioriza mostrar a parte superior das imagens */
  }
}

/* suaviza overlay em mobile */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .54), rgba(0, 0, 0, .03));
  pointer-events: none;
}

@media (max-width:560px) {
  .slide::after {
    background: linear-gradient(to top, rgba(0, 0, 0, .36), rgba(0, 0, 0, 0.02));
  }
}

/* caption organizado */
.slide .caption {
  position: relative;
  z-index: 3;
  max-width: 66%;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.22, .9, .3, 1), opacity .55s;
  backdrop-filter: blur(6px);
  background: var(--caption-bg);
  padding: .65rem .9rem;
  border-radius: var(--caption-radius);
}

.slide.is-active .caption {
  transform: translateY(0);
  opacity: 1;
}

.slide .caption h2 {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .2px;
}

.slide .caption p {
  margin: 0;
  font-size: clamp(.8rem, 1.7vw, .95rem);
  color: rgba(255, 255, 255, .9);
  font-weight: 600;
}

/* efeito de brilho leve */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, .03), transparent 55%);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .55;
}

/* Botões */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .28s, box-shadow .28s, background .28s, border-color .28s;
  box-shadow: 0 4px 16px -6px rgba(0, 0, 0, .55);
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

.carousel-btn:hover {
  transform: translateY(-52%) scale(1.06);
  background: linear-gradient(135deg, rgba(var(--carousel-accent-glow)/.18), rgba(var(--carousel-accent-glow)/.08));
  border-color: rgba(var(--carousel-accent-glow)/.9);
  box-shadow: 0 10px 30px -12px rgba(var(--carousel-accent-glow)/.45);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(.97);
}

/* Dots - OCULTADOS */
.carousel-dots,
.carousel-dot {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.carousel-dot {
  width: var(--carousel-dot-size);
  height: var(--carousel-dot-size);
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .28));
  cursor: pointer;
  transition: transform .35s, box-shadow .35s, background .35s;
  position: relative;
}

.carousel-dot.active {
  transform: scale(1.35);
  background: linear-gradient(135deg, var(--carousel-accent), #ff5c92);
  box-shadow: 0 6px 20px -8px rgba(var(--carousel-accent-glow)/.45);
}

.carousel-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(var(--carousel-accent-glow)/.9), transparent 60%);
  filter: blur(6px);
  opacity: 0;
  transition: opacity .45s;
}

.carousel-dot.active::after {
  opacity: .85;
}

/* Progress bar */
.carousel-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, .06);
  z-index: 12;
  overflow: hidden;
}

.carousel-progress-bar {
  width: var(--progress, 0%);
  height: 100%;
  transition: width .12s linear;
  background: linear-gradient(90deg, var(--carousel-accent), #ff8ab3);
  box-shadow: 0 0 12px -2px rgba(var(--carousel-accent-glow)/.9);
}

/* ===== LARGURA MAIOR PARA O CARROSSEL (TRABALHOS) ===== */
.works-feature .container.narrow {
  max-width: min(100%, 1280px);
  /* antes provável <= 1040px */
  padding-left: clamp(1rem, 2.4vw, 2.6rem);
  padding-right: clamp(1rem, 2.4vw, 2.6rem);
}

/* Extra large: expande mais */
@media (min-width:1400px) {
  .works-feature .container.narrow {
    max-width: 1440px;
  }
}

/* Variante opcional (adicione a classe works-wide no <section>) para efeito quase full-bleed */
.works-feature.works-wide .container.narrow {
  max-width: 100%;
}

.works-feature.works-wide .carousel {
  border-radius: 46px;
}

@media (min-width:1100px) {
  .works-feature.works-wide .carousel {
    /* leve bleed horizontal controlado */
    height: 920px;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
  }
}

/* Ajuste altura para desktop - melhor visualização das imagens */
@media (min-width:1200px) {
  :root {
    --carousel-height: 720px;
    /* altura maior para desktop */
  }

  .works-feature .slide {
    height: 720px;
    width: 500px;
    /* altura ajustada para mostrar melhor as imagens */
  }
}

/* Para telas muito grandes */
@media (min-width:1600px) {
  :root {
    --carousel-height: 800px;
    /* altura ainda maior para telas 4K */

  }

  .works-feature .slide {
    height: 800px;
  }

  .slide {
    background-position: center 35%;
    background-size: 60%;
    /* sobe a imagem de fundo para mostrar melhor a parte superior */
  }
}

/* ===== /LARGURA MAIOR ===== */

/* Altura específica para laptops/tablets grandes */
@media (min-width:821px) and (max-width:1199px) {
  :root {
    --carousel-height: 580px;
    /* altura intermediária para laptops */
  }
}

/* Responsividade */
@media (max-width:820px) {
  :root {
    --carousel-height: 530px;
    /* antes 300px */
  }

  .slide .caption {
    max-width: 78%;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width:768px) {
  :root {
    --carousel-height: 430px;
    /* antes 300px */
  }

}

@media (max-width:560px) {
  :root {
    --carousel-height: 350px;
    /* antes 250px */
    --carousel-dot-size: 10px;
  }

  .slide {
    align-items: flex-end;
    padding: .8rem;
  }

  .slide .caption {
    max-width: 92%;
    background: rgba(0, 0, 0, .28);
    padding: .6rem .8rem;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .carousel-dots {
    gap: 8px;
    padding: .25rem .45rem;
    bottom: 8px;
  }
}

@media (max-width:420px) {
  :root {
    --carousel-height: 230px;
    /* antes 210px */
  }

  .slide .caption h2 {
    font-size: 1rem;
  }

  .slide .caption p {
    font-size: .78rem;
  }

  .carousel-btn.prev {
    left: 8px;
  }

  .carousel-btn.next {
    right: 8px;
  }
}

/* acessibilidade */
.carousel-btn:focus-visible,
.carousel-dot:focus-visible {
  outline: 2px solid var(--carousel-accent);
  outline-offset: 3px;
}


@media (max-width:400px) {
  :root {
    --carousel-height: 300px;
    /* antes 300px */
  }
}

/* Correção para telas muito pequenas - menos de 340px */
@media (max-width:340px) {
  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .carousel-btn.prev {
    left: 6px;
  }

  .carousel-btn.next {
    right: 6px;
  }

  .slide {
    padding: .6rem;
  }

  .slide .caption {
    max-width: 88%;
    padding: .5rem .7rem;
  }

  .slide .caption h2 {
    font-size: .9rem;
  }

  .slide .caption p {
    font-size: .75rem;
  }

  :root {
    --carousel-height: 280px;
  }
}

/* FORÇA REMOÇÃO DAS BOLINHAS - OVERRIDE FINAL */
.carousel-dots,
.carousel .carousel-dots,
div[class*="carousel-dot"],
.carousel-dot,
button[class*="dot"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===== PRODUÇÕES (bloco works) refinamentos visuais ===== */
.works-feature .section-title {
  margin: 0 0 .8rem;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.25rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: .055em;
  background: linear-gradient(135deg, #d4c2a8, #c8b5a0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.02;
  position: relative;
  padding-left: 0;
}

.works-feature .lead {
  margin: 0 0 1.8rem;
  font-size: clamp(.9rem, 1rem + .25vw, 1.18rem);
  line-height: 1.55;
  background: linear-gradient(135deg, rgba(215,165,157,.92), rgba(194,184,176,.92));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 680px;
  font-weight: 500;
  letter-spacing: .01em;
  filter: saturate(1.05);
}

@supports not (-webkit-background-clip: text) {
  .works-feature .lead { color: #b49a88; -webkit-text-fill-color: initial; background: none; }
}

@supports not (-webkit-background-clip: text) {
  .works-feature .section-title { color: #d4c2a8; -webkit-text-fill-color: initial; background: none; }
  .works-feature .section-title::before { background: #d4c2a8; }
}
