:root {
  --blue-950: #062b55;
  --blue-900: #084680;
  --blue-700: #0b66b7;
  --cyan: #8ee1ff;
  --pink: #c43f97;
  --gold: #ffb321;
  --muted: #5f718b;
  --line: #d8e0ea;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--blue-950);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 252, 0.9)),
    #eaf0f7;
}

.app {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 18px 16px 34px;
}

.top-stack,
.people-stack {
  display: grid;
  gap: 24px;
}

.top-stack {
  margin-bottom: 26px;
}

.status-card,
.mini-card,
.candidate {
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(6, 43, 85, 0.08);
}

.status-card {
  padding: clamp(34px, 6vw, 48px) 40px;
}

.mini-card,
.insights article {
  padding: 36px 30px;
}

.status-card span,
.mini-card span,
.party,
.leader-label {
  display: block;
  color: var(--blue-700);
  font-size: clamp(0.92rem, 2.2vw, 1.2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}

.status-card strong {
  display: block;
  margin: 10px 0 12px;
  color: var(--blue-950);
  font-size: clamp(4.8rem, 15vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.status-card small {
  color: var(--muted);
  font-size: clamp(1.2rem, 3vw, 1.35rem);
}

.mini-card strong {
  display: block;
  margin-top: 12px;
  color: var(--blue-950);
  font-size: clamp(2.35rem, 7vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.solo-panel {
  margin-bottom: 28px;
}

.difference-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  padding: 38px 40px;
  border-radius: 42px;
  color: #fff;
  background: linear-gradient(150deg, var(--blue-950), var(--blue-700));
  text-align: center;
  box-shadow: 0 24px 60px rgba(6, 43, 85, 0.22);
}

.leader-label {
  color: var(--cyan);
}

.difference-panel strong {
  margin: 14px 0 8px;
  font-size: clamp(3.4rem, 10vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.difference-panel p {
  margin: 8px 0 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.35rem, 4vw, 1.62rem);
  font-weight: 900;
}

.difference-panel small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.05rem, 3vw, 1.28rem);
}

.bar {
  display: grid;
  grid-template-columns: var(--left-share, 50.024%) 1fr;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.bar span:first-child {
  background: var(--gold);
}

.bar span:last-child {
  background: var(--pink);
}

.people-stack {
  margin-bottom: 26px;
}

.candidate {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 22px;
  align-items: center;
  padding: 24px;
}

.candidate img {
  width: 156px;
  height: 156px;
  border: 12px solid #edf3f8;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
}

.winner {
  background: linear-gradient(135deg, rgba(255, 179, 33, 0.16), rgba(255, 255, 255, 0.96));
}

.opponent {
  background: linear-gradient(135deg, rgba(196, 63, 151, 0.12), rgba(255, 255, 255, 0.96));
}

.candidate h2 {
  margin: 8px 0 10px;
  color: var(--blue-950);
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 1.04;
  text-transform: uppercase;
}

.candidate strong {
  display: block;
  color: var(--blue-900);
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.candidate span:not(.leader-label) {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 900;
}

.logo-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 0;
}

.logo-card {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(6, 43, 85, 0.08);
}

.logo-card img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.initium-card {
  min-height: 320px;
  padding: 0;
  background: #050505;
}

.initium-card img {
  width: 100%;
  height: 100%;
}

.eco-card {
  padding: 34px;
}

.eco-card img {
  width: min(360px, 86%);
}

@media (max-width: 640px) {
  .app {
    padding: 14px 10px 28px;
  }

  .status-card,
  .mini-card,
  .logo-card,
  .difference-panel {
    border-radius: 28px;
    padding-inline: 24px;
  }

  .initium-card {
    min-height: 280px;
    padding: 0;
  }

  .logo-stack {
    grid-template-columns: 1fr;
  }

  .candidate {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .candidate img {
    margin: 0 auto;
  }
}

/* Ajustes solicitados: sin card de total de actas, actualización al final y bloque de patrocinadores */
.top-stack {
  margin-bottom: 26px;
}

.sponsors-section {
  margin: 6px 0 24px;
  padding: clamp(24px, 5vw, 34px);
  border: 1px solid var(--line);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(6, 43, 85, 0.08);
}

.section-heading {
  text-align: center;
  margin-bottom: 24px;
}

.section-heading span {
  display: block;
  color: var(--blue-700);
  font-size: clamp(1rem, 2.5vw, 1.22rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 8px 0 0;
  color: var(--blue-950);
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.1;
}

.sponsor-logos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 26px;
}

.sponsor-logo {
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid #e0e8f2;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 43, 85, 0.07);
}

.sponsor-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.initium-sponsor {
  background: #050505;
}

.initium-sponsor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eco-sponsor {
  padding: 26px;
}

.eco-sponsor img {
  width: min(360px, 92%);
}

.product-carousel {
  position: relative;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.product-carousel::-webkit-scrollbar {
  height: 10px;
}

.product-carousel::-webkit-scrollbar-track {
  background: #edf3f8;
  border-radius: 999px;
}

.product-carousel::-webkit-scrollbar-thumb {
  background: var(--blue-700);
  border-radius: 999px;
}

.carousel-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: sponsorSlide 32s linear infinite;
}

.product-carousel:hover .carousel-track {
  animation-play-state: paused;
}

.product-card {
  width: clamp(190px, 42vw, 260px);
  height: 310px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #e0e8f2;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(6, 43, 85, 0.08);
  scroll-snap-align: start;
}

.product-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.update-footer {
  margin: 18px auto 0;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
  box-shadow: 0 12px 28px rgba(6, 43, 85, 0.06);
}

.update-footer small {
  color: var(--muted);
  font-size: clamp(1.08rem, 3vw, 1.28rem);
}

@keyframes sponsorSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 18px)); }
}

@media (max-width: 640px) {
  .sponsors-section {
    border-radius: 28px;
    padding: 22px 14px;
  }

  .sponsor-logos {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sponsor-logo {
    min-height: 180px;
    border-radius: 24px;
  }

  .product-card {
    width: 210px;
    height: 280px;
    padding: 14px;
  }

  .carousel-track {
    animation-duration: 40s;
  }
}
