/* Illustrated public-career cards: a visual entry, followed by the real audience. */
.card.segment-card--illustrated {
  --segment-surface: #edf3f5;
  --segment-accent: #29566b;
  padding: 0;
  align-items: stretch;
  border: 1px solid #dbe5e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 4px rgb(12 29 44 / 2%);
  isolation: isolate;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.segment-card--illustrated::before { content: none; }
.segment-card--illustrated[data-segment-card="ministerio-publico"] { --segment-surface: #f4f0e9; --segment-accent: #865a2e; }
.segment-card--illustrated[data-segment-card="defensoria-publica"] { --segment-surface: #ecf4f1; --segment-accent: #2b655e; }
.segment-card__art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 17px 17px 0 0;
  background: var(--segment-surface);
}
.segment-card__art img, .segment-card__art > .segment-scene {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.segment-scene [data-art-part] { transform-box: fill-box; transform-origin: center; }
.segment-card__content { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 22px 24px 18px; }
.segment-card--illustrated .segment-card__eyebrow { margin: 0 0 10px; color: #526877; font-size: 10px; font-weight: 600; line-height: 1.6; letter-spacing: .09em; text-transform: uppercase; }
.card.segment-card--illustrated h3 { min-height: 2.5em; margin: 0 0 20px; font-size: clamp(21px, 1.8vw, 25px); line-height: 1.25; letter-spacing: -.035em; color: #142c3b; transition: color 280ms ease; }
@media (min-width: 1100px) {
  .card.segment-card--illustrated h3 { min-height: 0; }
}
.segment-card__facts { display: grid; gap: 15px; margin: 0 0 20px; }
.segment-card__facts > div { min-width: 0; }
.segment-card__facts dt { margin-bottom: 4px; font-size: 12px; line-height: 1.5; font-weight: 700; color: #254553; }
.segment-card__facts dd { margin: 0; font-size: 13px; line-height: 1.65; color: #526877; }
.segment-card__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: auto; padding-top: 14px; border-top: 1px solid #e4ebee; color: #29566b; font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: none; }
/* One native link per card; its hit area covers the illustration and copy too. */
.segment-card__link::after { content: ""; position: absolute; inset: 0; border-radius: 18px; z-index: 2; }
.segment-card__arrow { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #d7e2e9; border-radius: 50%; color: var(--segment-accent); background: #f2efea; transition: background 300ms ease, border-color 300ms ease, color 300ms ease; }
.segment-card__arrow svg { width: 18px; height: 18px; transform: rotate(0deg); transition: transform 320ms cubic-bezier(.22,1,.36,1); }
.segment-card__link:focus-visible { outline: none; }
.segment-card__link:focus-visible::after { outline: 3px solid #087d91; outline-offset: 4px; }
.segment-card--illustrated:focus-within { border-color: #29566b; box-shadow: 0 8px 24px rgb(12 29 44 / 8%); }
.segment-card--illustrated:focus-within .segment-card__arrow { background: #b67d40; border-color: #b67d40; color: #fff; }
.card.segment-card--illustrated:focus-within h3 { color: #b67d40; }
.segment-card--illustrated:focus-within .segment-card__arrow svg { transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) {
  .card.segment-card--illustrated:hover { border-color: #b67d40; box-shadow: 0 10px 28px rgb(182 125 64 / 16%); }
  .segment-card--illustrated:hover .segment-card__arrow { background: #b67d40; border-color: #b67d40; color: #fff; }
  .card.segment-card--illustrated:hover h3 { color: #b67d40; }
  .segment-card--illustrated:hover .segment-card__arrow svg { transform: rotate(-45deg); }
}
/* A tablet uses three horizontal rows, avoiding a stranded third card. */
@media (min-width: 641px) and (max-width: 900px) {
  .grid:has(> .segment-card--illustrated) { grid-template-columns: minmax(0, 1fr); }
  .card.segment-card--illustrated { display: grid; grid-template-columns: minmax(0, .36fr) minmax(0, .64fr); gap: 0; }
  .segment-card__art { height: 100%; min-height: 210px; aspect-ratio: auto; border-radius: 17px 0 0 17px; }
  .segment-card__art img, .segment-card__art > .segment-card__video, .segment-card__art > .segment-scene { position: absolute; inset: 0; }
  .segment-card__content { padding: 20px 24px 14px; }
  .card.segment-card--illustrated h3 { min-height: 0; margin-bottom: 16px; font-size: 23px; }
  .segment-card__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 640px) {
  .card.segment-card--illustrated { border-radius: 16px; }
  .segment-card__art { aspect-ratio: 16 / 9; border-radius: 15px 15px 0 0; }
  .segment-card__content { padding: 20px 18px 12px; }
  .card.segment-card--illustrated h3 { min-height: 0; margin-bottom: 18px; font-size: 24px; }
  .segment-card__facts { gap: 14px; margin-bottom: 18px; }
  .segment-card__facts dd { font-size: 14px; }
  .segment-card__link { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .card.segment-card--illustrated, .card.segment-card--illustrated h3, .segment-card__arrow, .segment-card__arrow svg { transition: none; }
}
@media print {
  .card.segment-card--illustrated { box-shadow: none; break-inside: avoid; }
}

.segment-card__art > .segment-card__preview { object-fit: cover; object-position: center; }
.segment-card__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.segment-card__video[hidden] { display: none; }
.segment-card__video[hidden] + .segment-card__still { display: block; }
.segment-card__still { display: none; width: 100%; height: 100%; }
.segment-card__still > .segment-scene { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .segment-card__preview { display: none !important; }
  .segment-card__video { display: none; }
  .segment-card__still { display: block; }
}

/* Crop the black side bands embedded in the Defensoria source video. */
.segment-card__art > .segment-card__video--defensoria { transform: scale(1.26); transform-origin: center; }

/* A moving highlight stays on the outline, leaving the media and copy untouched. */
@property --segment-border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.card.segment-card--illustrated::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(from var(--segment-border-angle), #b67d40 0deg, #b67d40 230deg, #f9deb0 275deg, #fff4db 288deg, #b67d40 320deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 300ms ease;
}
.card.segment-card--illustrated:focus-within::after { opacity: 1; animation: segment-border-shine 3s linear infinite; }
@media (hover: hover) and (pointer: fine) {
  .card.segment-card--illustrated:hover::after { opacity: 1; animation: segment-border-shine 3s linear infinite; }
}
@keyframes segment-border-shine { to { --segment-border-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .card.segment-card--illustrated::after { animation: none !important; transition: none; }
}



/* Compact editorial cards on the Base 24 home. */
.segment-card--compact .segment-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.segment-card--compact .segment-card__heading h3 { margin: 0; min-width: 0; }
.segment-card--compact .segment-card__link { flex: none; margin: 0; padding: 0; border: 0; min-width: 44px; justify-content: flex-end; }
.segment-card--compact .segment-card__summary { margin: 14px 0 8px; font-size: 14px; line-height: 1.55; color: #49677a; }
