/* Politician demo — photo-led hero.
   Uses separate desktop/mobile collage images as real hero background while keeping copy in HTML. */
[data-demo-static][data-category="politician"] #politician-top > section:first-of-type {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.92) 34%, rgba(255,255,255,.34) 58%, rgba(255,255,255,0) 100%),
    url("/images/politician/hero-collage-desktop.png") center right / cover no-repeat !important;
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 32%, rgba(255,255,255,.18) 61%, transparent 100%),
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05) 54%, rgba(247,251,255,.44));
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type > .absolute {
  display: none !important;
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type > .container-x {
  z-index: 1;
  min-height: 680px;
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type .md\:col-span-5 {
  max-width: 560px;
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type .md\:col-span-7 {
  display: none !important;
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type h1 {
  text-shadow: 0 1px 0 rgba(255,255,255,.62);
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type p.max-w-lg {
  color: #294765 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

[data-demo-static][data-category="politician"] #politician-top > section:first-of-type p.inline-flex.items-center.gap-2.rounded-full.border {
  border-radius: 0.5rem !important;
  border-color: rgba(30,120,219,.24) !important;
  background: rgba(255,255,255,.72) !important;
  box-shadow: 0 10px 28px rgba(73,126,178,.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* The flow diagram moves conceptually below the dashboard in the page flow; the hero itself stays photo-first. */
[data-demo-static][data-category="politician"] .civic-flow-after-dashboard {
  background: #ffffff;
  padding: 3rem 0 4rem;
}

@media (max-width: 767px) {
  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type {
    min-height: auto;
    display: block;
    background: #ffffff !important;
  }

  [data-demo-static][data-category="politician"] .civic-update-ledger {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    z-index: 5 !important;
    border: 0 !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.2) 68%, rgba(255, 255, 255, 0)) !important;
    color: #0b2f61 !important;
  }

  [data-demo-static][data-category="politician"] .civic-update-ledger__inner {
    padding: 0.84rem 1.1rem 1.65rem !important;
  }

  [data-demo-static][data-category="politician"] .civic-update-ledger__title,
  [data-demo-static][data-category="politician"] .civic-update-ledger__latest,
  [data-demo-static][data-category="politician"] .civic-update-ledger__toggle {
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.84) !important;
  }

  [data-demo-static][data-category="politician"] .civic-update-ledger__latest {
    color: #092857 !important;
  }

  /* Mobile uses the portrait image as a real visual band first, then the copy starts below it. */
  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type::before {
    content: "";
    position: relative !important;
    inset: auto !important;
    display: block;
    width: 100%;
    height: clamp(545px, 70vh, 650px);
    opacity: 1 !important;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 68%, rgba(255,255,255,.22) 90%, rgba(255,255,255,.78) 100%),
      url("/images/politician/hero-collage-mobile.png") top center / cover no-repeat !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type::after {
    top: 0;
    bottom: auto;
    height: clamp(545px, 70vh, 650px);
    z-index: 1;
    background:
      linear-gradient(180deg, transparent 0%, rgba(255,255,255,.035) 60%, rgba(255,255,255,.32) 90%, rgba(255,255,255,.82) 100%);
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type > .container-x {
    position: relative;
    z-index: 2;
    min-height: auto;
    margin-top: -2.35rem;
    padding-top: 0 !important;
    padding-bottom: 2.4rem !important;
    gap: 1.1rem !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type .md\:col-span-5 {
    margin-top: -23px !important;
    max-width: none;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type p.inline-flex.items-center.gap-2.rounded-full.border {
    height: 31.72px !important;
    margin-top: 30px !important;
    margin-bottom: 2.6px !important;
    padding: 0 0.78rem !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    background: rgba(255,255,255,.86) !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type h1 {
    padding-top: 15px !important;
    padding-bottom: 8px !important;
    font-size: clamp(2.18rem, 9.5vw, 2.85rem) !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    letter-spacing: 0.075em !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type .my-7 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }

  /* Keep only the real mobile lead visible and do not cut the sentence. */
  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type p.hidden.max-w-lg {
    display: none !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type p.md\:hidden.max-w-lg {
    display: block !important;
    max-width: 100%;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    font-size: 0.93rem !important;
    line-height: 1.85 !important;
    text-shadow: none;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type dl {
    margin-top: 1rem !important;
    margin-bottom: 25px !important;
    padding: 0.9rem 0.95rem !important;
    border: 1px solid rgba(191,224,255,.72) !important;
    background: rgba(255,255,255,.76);
    box-shadow: 0 14px 34px rgba(73,126,178,.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type dl > div {
    grid-template-columns: 5.2rem 1fr !important;
    gap: 0.7rem !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type .mt-8 {
    --politician-hero-cta-inset: min(70px, 16vw);
    margin-top: 1.1rem !important;
    gap: 0.9rem !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type .mt-8 a {
    box-sizing: border-box;
    flex: 0 0 min(17rem, calc(100vw - 7.75rem)) !important;
    min-height: 3rem !important;
    min-width: min(17rem, calc(100vw - 7.75rem)) !important;
    width: min(17rem, calc(100vw - 7.75rem)) !important;
    gap: 0.75rem !important;
    justify-content: center !important;
    margin-left: var(--politician-hero-cta-inset) !important;
    margin-right: var(--politician-hero-cta-inset) !important;
    padding-inline: 1rem !important;
    font-size: 0.8rem !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type .mt-8 a:first-child {
    margin-top: 7px !important;
  }

  [data-demo-static][data-category="politician"] #politician-top > section:first-of-type .mt-8 a:nth-child(2) {
    margin-bottom: 20px !important;
  }
}
