/* =========================================================
   Desfile — carrossel dos painéis (adaptado da referência)
   Cores mapeadas para a marca Mídia On: fundo verde-escuro,
   ponto de seleção e foco em verde-limão.
   ========================================================= */
.ds {
  --ds-fondo: var(--ink);
  --ds-hoja: #12301e;
  --ds-carbon: #ffffff;
  --ds-carbon-2: rgba(255, 255, 255, .76);
  --ds-tenue: rgba(255, 255, 255, .56);
  --ds-gris: rgba(255, 255, 255, .14);
  --ds-linea: rgba(255, 255, 255, .08);
  --ds-borde: rgba(255, 255, 255, .38);
  --ds-marca: var(--lime);            /* ponto de seleção, fim do percurso */
  --ds-foco: var(--lime);
  --ds-curva: cubic-bezier(.22, 1, .36, 1);
  --ds-resorte: cubic-bezier(.34, 1.45, .64, 1);
  --ds-hueco: 28px;

  position: relative;
  padding: clamp(90px, 11vw, 150px) 0 clamp(80px, 9vw, 130px);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(64, 149, 50, .22), transparent 60%),
    var(--ds-fondo);
  color: var(--ds-carbon);
  overflow: hidden;
}
.ds-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ds :focus-visible { outline: 2px solid var(--ds-foco); outline-offset: 3px; border-radius: 10px; }

/* ── cabeçalho e controles ─────────────────────────────── */
.ds-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.ds-cab .title { margin: 0; }
.ds-sub { margin: 14px 0 0; max-width: 520px; font-size: 1rem; color: var(--ds-carbon-2); }
.ds-controles { display: flex; align-items: center; gap: 12px; flex: none; }
.ds-pausa {
  display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 20px 0 16px;
  border: 0; border-radius: 26px; background: transparent; color: var(--ds-carbon); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--ds-borde);
  font-family: var(--f-display); font-weight: 700; font-size: .86rem;
  transition: background-color .25s, box-shadow .25s, color .25s, transform .35s var(--ds-resorte);
}
.ds-pausa svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ds-pausa[data-pausado="1"] svg { fill: currentColor; }
.ds-pausa[data-pausado="1"] { background: var(--ds-carbon); color: var(--ink); box-shadow: none; }
.ds-pausa:disabled { opacity: .5; cursor: default; }
.ds-flechas { display: flex; gap: 8px; }
.ds-flecha {
  display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--green); color: #fff;
  box-shadow: 0 12px 26px -12px rgba(64, 149, 50, .9);
  transition: transform .35s var(--ds-resorte), background-color .25s, color .25s, opacity .25s;
}
.ds-flecha svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ds-flecha:disabled { background: transparent; color: var(--ds-tenue); box-shadow: inset 0 0 0 1.5px var(--ds-gris); cursor: default; }
.ds-flecha:not(:disabled):active, .ds-pausa:not(:disabled):active { transform: scale(.92); }
@media (hover: hover) {
  .ds-flecha:not(:disabled):hover { transform: scale(1.07); background: var(--lime); color: var(--ink); }
  .ds-pausa:not([data-pausado="1"]):not(:disabled):hover { box-shadow: inset 0 0 0 1.5px var(--lime); color: var(--lime); }
}

/* ── a pista: scroll nativo com ímã ────────────────────── */
.ds-carrusel { position: relative; }
.ds-pista {
  position: relative; display: flex; gap: var(--ds-hueco);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 8px 0 44px; margin: -8px 0 -44px; cursor: grab;
}
.ds-pista::-webkit-scrollbar { display: none; }
.ds-pista.ds-arrastra { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.ds-pista.ds-arrastra * { pointer-events: none; }

.ds-card {
  flex: 0 0 calc((100% - var(--ds-hueco)) / 2);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  border-radius: 26px; background: var(--ds-hoja); overflow: hidden;
  box-shadow: 0 0 0 1px var(--ds-linea), 0 30px 50px -30px rgba(0, 0, 0, .8);
  transition: opacity .45s var(--ds-curva), filter .45s, box-shadow .4s;
}
.ds-card[inert] { opacity: .42; filter: saturate(.6); }
.ds-card[data-guardada] { box-shadow: 0 0 0 2px var(--ds-marca), 0 30px 50px -30px rgba(0, 0, 0, .8); }

.ds-foto { position: relative; height: clamp(260px, 30vw, 380px); overflow: hidden; background: #0e2416; }
.ds-foto img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; transition: transform .9s var(--ds-curva); }
@media (hover: hover) { .ds-card:not([inert]):hover .ds-foto img { transform: scale(1.05); } }
.ds-foto::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(0deg, rgba(18, 48, 30, .95) 10%, rgba(18, 48, 30, .5) 55%, transparent); pointer-events: none; }
.ds-num {
  position: absolute; left: 18px; top: 18px; z-index: 1;
  padding: 7px 14px; border-radius: 999px; background: var(--green); color: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: .74rem; letter-spacing: .12em;
}
.ds-impacto {
  position: absolute; left: 22px; bottom: 16px; z-index: 1; color: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1; letter-spacing: -.02em;
}
.ds-impacto small { display: block; margin-top: 4px; font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
/* o ponto de marcação: aparece quando o painel é selecionado */
.ds-punto {
  position: absolute; top: 18px; right: 18px; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ds-marca); box-shadow: 0 0 0 4px var(--ds-hoja), 0 8px 14px -6px rgba(0, 0, 0, .7);
  transform: scale(0); transition: transform .5s var(--ds-resorte);
}
.ds-card[data-guardada] .ds-punto { transform: scale(1); }

.ds-texto { display: flex; flex: 1; flex-direction: column; padding: 22px 26px 22px; }
.ds-tipo { margin: 0; font-size: .8rem; color: var(--ds-tenue); }
.ds-tipo b { margin-right: 8px; color: var(--lime); font-family: var(--f-display); letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; }
.ds-texto h3 { margin: 8px 0 0; font-family: var(--f-display); font-weight: 800; color: #fff; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.1; letter-spacing: -.02em; text-transform: uppercase; }
.ds-dato { margin: 6px 0 0; font-size: .98rem; color: var(--ds-carbon-2); }
.ds-fin { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.ds-mapa { font-family: var(--f-display); font-weight: 700; font-size: .82rem; color: #fff; border-bottom: 2px solid var(--lime); padding-bottom: 2px; transition: color .3s; }
.ds-mapa:hover { color: var(--lime); }
.ds-guarda {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 13px;
  border: 0; border-radius: 19px; background: transparent; color: var(--ds-carbon); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--ds-borde);
  font-family: var(--f-display); font-size: .8rem; font-weight: 700;
  transition: background-color .25s, box-shadow .25s, color .25s, transform .35s var(--ds-resorte);
}
.ds-guarda::before { content: ""; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; transition: background-color .25s, box-shadow .25s; }
.ds-guarda[aria-pressed="true"] { background: var(--ds-marca); color: var(--ink); box-shadow: none; }
.ds-guarda[aria-pressed="true"]::before { background: var(--ink); box-shadow: none; }
.ds-guarda:active { transform: scale(.94); }
@media (hover: hover) { .ds-guarda:not([aria-pressed="true"]):hover { box-shadow: inset 0 0 0 1.5px var(--lime); color: var(--lime); } }

/* ── rodapé: contador, barra e estado do avanço ────────── */
.ds-pie { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 24px; margin-top: 36px; }
.ds-cuenta { display: flex; align-items: baseline; gap: 10px; margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 46px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--lime); }
.ds-rueda { display: inline-block; height: 1em; overflow: hidden; }
.ds-cifras { display: block; transform: translateY(calc(var(--n, 1) * -1em)); transition: transform .55s var(--ds-resorte); }
.ds-cifras i { display: block; height: 1em; line-height: 1; font-style: normal; }
.ds-de { color: var(--ds-tenue); font-size: 26px; font-weight: 600; }
.ds-progreso { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; }
.ds-barra { position: relative; flex: 1; height: 4px; border-radius: 3px; background: var(--ds-gris); overflow: hidden; }
.ds-barra i { position: absolute; inset: 0; background: var(--ds-carbon); transform-origin: left; transform: scaleX(var(--p, .5)); transition: transform .35s var(--ds-curva), background-color .4s; }
.ds-progreso[data-completo] .ds-barra i { background: var(--ds-marca); }
.ds-sello { display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 0; margin-left: -14px; overflow: hidden; opacity: 0; transform: translateX(-8px) scale(.9); transform-origin: left center; transition: opacity .3s, transform .55s var(--ds-resorte), max-width .55s var(--ds-curva), margin-left .55s var(--ds-curva); pointer-events: none; }
.ds-sello svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--ds-marca); fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ds-sello em { font-style: normal; font-size: .84rem; font-weight: 700; color: var(--lime); white-space: nowrap; }
.ds-progreso[data-completo] .ds-sello { max-width: 260px; margin-left: 0; opacity: 1; transform: none; }
.ds-estado { display: flex; align-items: center; gap: 9px; justify-content: flex-end; margin: 0; font-size: .84rem; color: var(--ds-tenue); text-align: right; }
.ds-estado i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.ds-estado[data-parado="1"] i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ds-borde); }
.ds-estado[data-marcha="1"] i { animation: ds-late 1.6s ease-in-out infinite; }
@keyframes ds-late { 0%, 100% { box-shadow: 0 0 0 0 rgba(140, 198, 63, .5); } 50% { box-shadow: 0 0 0 6px rgba(140, 198, 63, 0); } }
.ds-vivo { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── barra de seleção → simulador ──────────────────────── */
.ds-sel {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 30px; padding: 14px 14px 14px 26px; border-radius: 999px;
  background: rgba(140, 198, 63, .1); border: 1px solid rgba(140, 198, 63, .35);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .45s var(--ds-curva), transform .55s var(--ds-resorte);
}
.ds-sel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ds-sel p { margin: 0; color: #fff; font-size: .98rem; }
.ds-sel b { font-family: var(--f-display); color: var(--lime); font-size: 1.3rem; }

/* ── celular: 1,15 card para mostrar o próximo ─────────── */
@media (max-width: 860px) {
  .ds { --ds-hueco: 16px; }
  .ds-cab { flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 26px; }
  .ds-controles { justify-content: space-between; }
  .ds-card { flex-basis: 86%; }
  .ds-foto { height: 250px; }
  .ds-pie { grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; margin-top: 30px; }
  .ds-estado { grid-column: 1 / -1; justify-content: flex-start; text-align: left; }
  .ds-cuenta { font-size: 38px; }
  .ds-de { font-size: 22px; }
  .ds-sello em { display: none; }
  .ds-sel { border-radius: 22px; padding: 16px 18px; }
  .ds-sel .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ds *, .ds *::before, .ds *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
