/* ==========================================================
   PAINEL DE RESULTADOS V2
   ========================================================== */

.hero-panel {
  --hero-image: url("../assets/fwd-wins.webp");
  --hero-position: 72% center;
  position: relative;
  isolation: isolate;
  display: flex !important;
  align-items: center;
  min-height: clamp(520px, 46vw, 680px);
  padding: clamp(42px, 6vw, 82px);
  overflow: hidden;
  border-color: color-mix(in srgb, var(--scope-accent) 28%, var(--border));
  background: #0b0f1c;
}

.hero-media {
  display: none !important;
}

.hero-panel::before {
  content: "";
  display: block !important;
  position: absolute;
  z-index: 0;
  inset: 0;
  width: auto;
  height: auto;
  opacity: 1 !important;
  transform: none !important;
  border: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(
      90deg,
      rgba(7, 10, 20, 0.98) 0%,
      rgba(7, 10, 20, 0.92) 32%,
      rgba(7, 10, 20, 0.66) 57%,
      rgba(7, 10, 20, 0.24) 100%
    ),
    var(--hero-image);
  background-repeat: no-repeat;
  background-position: center, var(--hero-position);
  background-size: cover, cover;
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: inherit;
  box-shadow: inset 0 -110px 140px rgba(4, 6, 13, 0.38);
  background:
    radial-gradient(
      circle at 76% 48%,
      color-mix(in srgb, var(--scope-accent) 10%, transparent),
      transparent 34%
    );
  pointer-events: none;
}

body[data-scope="team02"] .hero-panel::after {
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: inherit;
  box-shadow: inset 0 -110px 140px rgba(4, 6, 13, 0.38);
  opacity: 1;
  background:
    linear-gradient(rgba(24, 168, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 64, 56, 0.10) 1px, transparent 1px),
    radial-gradient(circle at 78% 46%, rgba(255, 64, 56, 0.12), transparent 34%);
  background-size: 44px 44px, 44px 44px, auto;
  mask-image: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(100%, 760px);
  max-width: 760px !important;
  align-self: auto;
}

.demo-chip {
  position: absolute;
  z-index: 4;
  top: 24px;
  right: 24px;
  width: fit-content;
  margin: 0;
}

.results-section {
  overflow: hidden;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.result-card {
  --accent: var(--lime);
  --winner-image: url("../assets/fwd-wins.webp");
  position: relative;
  isolation: isolate;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255,255,255,.08));
  border-radius: 26px;
  background: #0a0e19;
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.30),
    inset 0 0 0 1px rgba(255,255,255,.015);
}

.result-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: var(--winner-image);
  background-size: cover;
  background-position: center top;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.02);
}

.result-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(6, 8, 15, 0.38) 0%,
      rgba(6, 8, 15, 0.72) 42%,
      rgba(6, 8, 15, 0.97) 100%
    ),
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 46%
    );
}

.result-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 24px;
}

.result-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.result-card-label {
  display: grid;
  gap: 6px;
}

.result-card-label span {
  color: color-mix(in srgb, var(--accent) 82%, white 10%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.result-card-label strong {
  max-width: 250px;
  color: #fff;
  font-size: 1.12rem;
  line-height: 1.16;
}

.result-card-symbol {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,.08));
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 14%, rgba(5,7,13,.72));
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.result-winner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: auto;
  padding-top: 52px;
}

.result-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, rgba(255,255,255,.10));
  border-radius: 15px;
  background: rgba(6, 8, 15, 0.76);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 900;
}

.result-winner-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.result-winner-copy span {
  color: rgba(235, 239, 249, 0.68);
  font-size: 0.76rem;
}

.result-winner-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-value {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.result-value span {
  color: rgba(235, 239, 249, 0.62);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-value strong {
  color: var(--accent);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1;
  text-align: right;
}

.result-card.is-empty::before {
  opacity: 0.26;
  filter: grayscale(1);
}

.ranking-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .results-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero-panel {
    display: flex !important;
    align-items: flex-end;
    min-height: 650px;
    padding: 320px 28px 42px;
  }

  .hero-panel::before {
    background-image:
      linear-gradient(
        180deg,
        rgba(6, 8, 15, 0.10) 0%,
        rgba(6, 8, 15, 0.28) 32%,
        rgba(6, 8, 15, 0.83) 58%,
        rgba(6, 8, 15, 0.99) 82%
      ),
      var(--hero-image);
    background-position: center, center top;
    background-size: cover, cover;
  }

  .hero-copy {
    width: 100%;
    max-width: none !important;
  }
}

@media (max-width: 720px) {
  .hero-panel {
    min-height: 620px;
    padding: 300px 20px 30px;
  }

  .demo-chip {
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
  }

  .results-grid,
  .ranking-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-card,
  .result-card-content {
    min-height: 282px;
  }
}

/* ==========================================================
   CORREÇÃO DEFINITIVA DE IMAGENS V2
   Usa elementos <img> reais em vez de imagens via variáveis CSS.
   ========================================================== */

.hero-panel {
  position: relative;
  isolation: isolate;
  background: #090d18 !important;
}

.hero-backdrop-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.hero-panel::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  z-index: 1 !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  opacity: 1 !important;
  transform: none !important;
  border: 0 !important;
  border-radius: inherit !important;
  background:
    linear-gradient(
      90deg,
      rgba(6, 8, 16, 0.98) 0%,
      rgba(6, 8, 16, 0.91) 34%,
      rgba(6, 8, 16, 0.61) 60%,
      rgba(6, 8, 16, 0.22) 100%
    ) !important;
  pointer-events: none;
}

.hero-panel::after {
  z-index: 2 !important;
  pointer-events: none;
}

.hero-copy,
.demo-chip {
  z-index: 3 !important;
}

.hero-media {
  display: none !important;
}

.result-card::before,
.result-card::after {
  content: none !important;
  display: none !important;
}

.result-card-bg-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.92) contrast(1.05);
  transform: scale(1.015);
  pointer-events: none;
}

.result-card-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  background:
    linear-gradient(
      180deg,
      rgba(5, 7, 14, 0.34) 0%,
      rgba(5, 7, 14, 0.72) 44%,
      rgba(5, 7, 14, 0.98) 100%
    ),
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--accent) 15%, transparent),
      transparent 48%
    );
  pointer-events: none;
}

.result-card-content {
  position: relative;
  z-index: 2;
}

.result-card.is-empty .result-card-bg-image {
  opacity: 0.24;
  filter: grayscale(1);
}

@media (max-width: 980px) {
  .hero-backdrop-image {
    object-position: center top !important;
  }

  .hero-panel::before {
    background:
      linear-gradient(
        180deg,
        rgba(5, 7, 14, 0.08) 0%,
        rgba(5, 7, 14, 0.26) 34%,
        rgba(5, 7, 14, 0.84) 60%,
        rgba(5, 7, 14, 0.99) 86%
      ) !important;
  }
}
