header.instituto-hero {
  background-image:
    linear-gradient(90deg, rgba(250, 253, 255, 0.98) 0%, rgba(250, 253, 255, 0.96) 22%, rgba(250, 253, 255, 0.82) 35%, rgba(250, 253, 255, 0.45) 49%, rgba(250, 253, 255, 0.14) 61%, rgba(250, 253, 255, 0.02) 72%, rgba(250, 253, 255, 0) 100%),
    url('./hero-background-v3.png') !important;
  background-size: auto, cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.iel-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.9rem;
  background: #174ea6;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(23, 78, 166, 0.16);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.iel-page-link:hover {
  background: #0d3f91;
  transform: translateY(-1px);
}

.iel-page-link:focus-visible,
.result-main a:focus-visible,
.result-main button:focus-visible,
.result-filter-bar :focus-visible,
.result-dialog button:focus-visible {
  outline: 3px solid #174ea6;
  outline-offset: 4px;
}

body[data-page='resultados'] .instituto-hero-title {
  font-size: clamp(2.7rem, 4vw, 4.2rem);
  overflow-wrap: anywhere;
}

.result-filter-bar {
  color: #15365f;
}

.result-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.result-search {
  min-width: 0;
}

.result-search input {
  width: 100%;
  height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.97);
  color: #15365f;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.result-search-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.result-search-row p {
  font-size: 0.8rem;
  color: #356279;
  white-space: nowrap;
}

.result-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(10rem, auto);
  gap: 0.85rem;
  align-items: end;
  margin-top: 1rem;
}

.result-select {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.result-select-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #205060;
}

.result-select select {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 0.75rem;
  background: rgba(247, 255, 253, 0.95);
  color: #15365f;
}

.result-reset-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100%;
}

.result-helper {
  font-size: 0.75rem;
  color: #437286;
  text-align: right;
}

.result-reset {
  padding: 0.78rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  color: #174ea6;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.result-main {
  padding-bottom: 2rem;
}

.result-section {
  background: #fff;
  border: 1px solid #e2ebf2;
  border-top: 4px solid #1e5bb8;
  overflow: hidden;
}

.result-section-heading {
  padding: 1.35rem 1.35rem 1.05rem;
  border-bottom: 1px solid #e7eef5;
}

.result-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.result-section-heading p {
  color: #5f6f85;
  font-size: 0.9rem;
  margin-top: 0.35rem;
  max-width: 40rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.result-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e4edf5;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.result-card:hover {
  box-shadow: 0 14px 34px rgba(21, 54, 95, 0.08);
  transform: translateY(-1px);
}

.result-image-button {
  position: relative;
  display: block;
  width: 100%;
  background: #f5f8fb;
  cursor: zoom-in;
}

.result-image-button img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.result-image-caption {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(13, 63, 145, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.result-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
}

.result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(23, 78, 166, 0.08);
  color: #174ea6;
  font-size: 0.75rem;
  font-weight: 700;
}

.result-chip-muted {
  background: rgba(99, 200, 196, 0.16);
  color: #22666e;
}

.result-card h3 {
  font-size: 1.05rem;
  line-height: 1.28;
  font-weight: 800;
  color: #17345d;
}

.result-description {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #53657c;
}

.result-meta {
  color: #6a7a8f;
  font-size: 0.8rem;
  font-weight: 600;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.result-action-button,
.result-links a,
.result-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.result-action-button {
  border: 0;
  background: #174ea6;
  color: #fff;
  cursor: pointer;
}

.result-action-button:hover {
  background: #0d3f91;
}

.result-actions a {
  color: #174ea6;
  background: rgba(23, 78, 166, 0.08);
}

.result-actions a:hover {
  background: rgba(23, 78, 166, 0.14);
}

.result-empty {
  padding: 3rem 1.25rem;
  text-align: center;
}

.result-empty h3 {
  font-weight: 700;
}

.result-empty p {
  margin-top: 0.5rem;
  color: #5f6f85;
}

.result-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.75rem;
  color: #5f6f85;
}

.result-dialog {
  margin: auto;
  width: min(90vw, 70rem);
  max-height: 90vh;
  padding: 1rem;
  border: 0;
  border-radius: 1rem;
  background: white;
}

.result-dialog::backdrop {
  background: #10223bcc;
}

.result-dialog button {
  display: block;
  margin-left: auto;
  margin-bottom: 0.75rem;
  cursor: pointer;
  color: #174ea6;
}

.result-dialog img {
  max-width: 100%;
  max-height: 75vh;
  margin: auto;
  object-fit: contain;
}

@media (max-width: 1279px) and (min-width: 1024px) {
  .instituto-hero-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(1rem, 3vw, 2rem);
  }
}

@media (max-width: 1023px) {
  .result-search-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .result-search-meta {
    justify-content: flex-start;
  }

  .result-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-reset-wrap {
    justify-content: flex-start;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body[data-page='resultados'] .instituto-hero-title {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  .result-controls {
    grid-template-columns: 1fr;
  }

  .result-search input {
    font-size: 1rem;
  }

  .result-select select {
    font-size: 1rem;
  }

  .result-image-button img {
    aspect-ratio: 4 / 3;
  }
}

/* Entregas — visualização compacta aprovada em 29/09/2026.
   Escopo restrito aos cards da página de Resultados. */
.result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  padding: 1rem;
}

.result-card.result-card-compact {
  display: grid;
  grid-template-columns: 9.25rem minmax(0, 1fr);
  min-height: 10.75rem;
  border: 1px solid #dfe9f3;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(28, 65, 108, .045);
  transform: none;
}

.result-card.result-card-compact:hover {
  transform: none;
  box-shadow: 0 9px 24px rgba(28, 65, 108, .08);
}

.result-image-button.result-image-button-compact {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 10.75rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #eef4f8;
}

.result-image-button.result-image-button-compact img {
  width: 100%;
  height: 100%;
  min-height: 10.75rem;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center top;
  transition: transform .18s ease;
}

.result-image-button.result-image-button-compact:hover img {
  transform: scale(1.015);
}

.result-image-zoom {
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: .55rem;
  background: rgba(255,255,255,.94);
  color: #174ea6;
  box-shadow: 0 3px 10px rgba(15, 50, 92, .12);
  font-size: .9rem;
  font-weight: 800;
}

.result-card-body.result-card-body-compact {
  min-width: 0;
  padding: .8rem .85rem .75rem;
  gap: .42rem;
  justify-content: flex-start;
}

.result-meta.result-meta-top {
  order: -2;
  margin: 0;
  font-size: .69rem;
  line-height: 1;
  color: #73849a;
  font-weight: 700;
}

.result-card-compact .result-badges {
  order: -1;
  gap: .35rem;
}

.result-card-compact .result-chip {
  padding: .22rem .48rem;
  font-size: .66rem;
  line-height: 1.1;
}

.result-card-compact h3 {
  margin: .08rem 0 0;
  font-size: .9rem;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-description.result-description-compact {
  margin: 0;
  font-size: .72rem;
  line-height: 1.35;
  color: #5a6d83;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-actions.result-actions-compact {
  margin-top: auto;
  gap: .4rem;
}

.result-actions.result-actions-compact a {
  min-height: 1.95rem;
  max-width: 100%;
  padding: .38rem .58rem;
  border-radius: .55rem;
  font-size: .68rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@media (max-width: 767px) {
  .result-grid {
    grid-template-columns: 1fr;
    gap: .7rem;
    padding: .75rem;
  }

  .result-card.result-card-compact {
    grid-template-columns: 7.25rem minmax(0, 1fr);
    min-height: 9rem;
  }

  .result-image-button.result-image-button-compact,
  .result-image-button.result-image-button-compact img {
    min-height: 9rem;
  }

  .result-card-body.result-card-body-compact {
    padding: .7rem;
  }

  .result-description.result-description-compact {
    -webkit-line-clamp: 1;
  }

  .result-actions.result-actions-compact a {
    max-width: 13rem;
  }
}
