.convenios-page,
.convenio-show {
  overflow: hidden;
  background: #fff;
  color: var(--vincula-black);
}

.convenios-hero,
.convenio-show__hero {
  position: relative;
  overflow: hidden;
  background: var(--vincula-purple);
}

.convenios-hero {
  padding: 90px 0 73px;
}

.convenios-hero::before,
.convenio-show__hero::before {
  content: "";
  position: absolute;
  width: 430px;
  aspect-ratio: 1;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgb(255 255 255 / 4%), 0 0 0 100px rgb(0 0 0 / 2%);
}

.convenios-hero::before {
  right: -120px;
  bottom: -250px;
}

.convenios-hero__content {
  position: relative;
  z-index: 1;
  max-width: 810px;
  margin: 0 auto;
  text-align: center;
}

.convenios-eyebrow,
.convenios-label {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.convenios-eyebrow {
  border: 1px solid rgb(0 0 0 / 20%);
}

.convenios-label {
  margin-bottom: 12px;
  background: rgb(120 94 240 / 12%);
  color: var(--vincula-purple);
}

.convenios-hero h1 {
  margin: 23px 0 18px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -3px;
}

.convenios-hero__content > p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.78;
}

.convenios-breadcrumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
  font-size: .8rem;
  font-weight: 750;
}

.convenios-breadcrumbs li + li::before {
  content: "·";
  margin-right: 10px;
}

.convenios-breadcrumbs a {
  color: #000;
  text-underline-offset: 4px;
}

.convenios-admin-button {
  display: inline-flex;
  margin-top: 24px;
  padding: 11px 19px;
  border-radius: 50px;
  background: var(--vincula-yellow);
  color: #000;
  font-weight: 800;
  text-decoration: none;
}

.convenios-catalogo {
  padding: 90px 0 105px;
  background: #fff;
}

.convenios-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 30px;
}

.convenios-heading h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  font-weight: 850;
  letter-spacing: -2px;
}

.convenios-count {
  flex: 0 0 auto;
  padding: 9px 15px;
  border-radius: 50px;
  background: #f2f0f8;
  color: var(--vincula-dark);
  font-size: .76rem;
  font-weight: 750;
}

.convenios-filtros {
  display: flex;
  align-items: end;
  gap: 13px;
  margin-bottom: 44px;
  padding: 18px;
  border: 1px solid #e2deea;
  border-radius: 19px;
  background: #faf9fc;
  box-shadow: 0 8px 25px rgb(45 34 91 / 6%);
}

.convenios-filtros__search {
  position: relative;
  flex: 1 1 390px;
}

.convenios-filtros__search > span {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--vincula-purple);
  font-size: 1.25rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.convenios-filtros__search input,
.convenios-filtros__order select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dcd7e6;
  border-radius: 12px;
  background: #fff;
  color: #000;
  font-size: .82rem;
  outline: none;
}

.convenios-filtros__search input {
  padding: 0 16px 0 45px;
}

.convenios-filtros__search input:focus,
.convenios-filtros__order select:focus {
  border-color: var(--vincula-purple);
  box-shadow: 0 0 0 3px rgb(120 94 240 / 14%);
}

.convenios-filtros__order {
  flex: 0 1 220px;
}

.convenios-filtros__order label {
  display: block;
  margin: 0 0 6px 3px;
  color: var(--vincula-dark);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.convenios-filtros__order select {
  padding: 0 38px 0 13px;
}

.convenios-filtros__submit {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 50px;
  background: var(--vincula-yellow);
  color: #000;
  font-size: .78rem;
  font-weight: 850;
}

.convenios-filtros__clear {
  min-height: 48px;
  align-content: center;
  padding: 0 8px;
  color: var(--vincula-purple);
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}

.convenios-grid > .col-xl-6:nth-child(6n + 1) { --convenio-accent: #e4579d; --convenio-contrast: #000; }
.convenios-grid > .col-xl-6:nth-child(6n + 2) { --convenio-accent: #785ef0; --convenio-contrast: #fff; }
.convenios-grid > .col-xl-6:nth-child(6n + 3) { --convenio-accent: #ffb000; --convenio-contrast: #000; }
.convenios-grid > .col-xl-6:nth-child(6n + 4) { --convenio-accent: #779dff; --convenio-contrast: #000; }
.convenios-grid > .col-xl-6:nth-child(6n + 5) { --convenio-accent: #5bb4a5; --convenio-contrast: #000; }
.convenios-grid > .col-xl-6:nth-child(6n) { --convenio-accent: #009e73; --convenio-contrast: #000; }

.convenio-card {
  display: flex;
  height: 100%;
  min-height: 285px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--convenio-accent), transparent 60%);
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 10px 34px color-mix(in srgb, var(--convenio-accent), transparent 88%);
  transition: transform .35s ease, box-shadow .35s ease;
}

.convenio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--convenio-accent), transparent 76%);
}

.convenio-card__visual {
  position: relative;
  display: grid;
  width: 38%;
  min-width: 190px;
  place-items: center;
  overflow: hidden;
  padding: 27px;
  background:
    radial-gradient(circle at 80% 17%, rgb(255 255 255 / 28%) 0 11%, transparent 11.5%),
    radial-gradient(circle at 14% 88%, rgb(0 0 0 / 9%) 0 18%, transparent 18.5%),
    var(--convenio-accent);
}

.convenio-card__visual::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid color-mix(in srgb, var(--convenio-contrast), transparent 72%);
  border-radius: 15px;
}

.convenio-card__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 135px;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgb(0 0 0 / 12%));
}

.convenio-card__visual > span {
  position: relative;
  z-index: 1;
  color: var(--convenio-contrast);
  font-size: 3.1rem;
  font-weight: 850;
  letter-spacing: -2px;
}

.convenio-card__body {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: flex-start;
  flex-direction: column;
  padding: 28px 26px 24px;
}

.convenio-card__eyebrow {
  color: color-mix(in srgb, var(--convenio-accent), black 30%);
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.convenio-card h3 {
  margin: 9px 0 12px;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.25;
}

.convenio-card h3 a {
  color: #000;
  text-decoration: none;
}

.convenio-card h3 a:hover {
  color: color-mix(in srgb, var(--convenio-accent), black 32%);
}

.convenio-card__body > p {
  flex-grow: 1;
  margin-bottom: 20px;
  color: var(--vincula-dark);
  font-size: .83rem;
  line-height: 1.7;
}

.convenio-card__footer {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 15px;
  padding-top: 17px;
  border-top: 1px solid #ebe8ef;
}

.convenio-card__details,
.convenio-card__external {
  font-size: .76rem;
  font-weight: 850;
  text-decoration: none;
}

.convenio-card__details {
  color: color-mix(in srgb, var(--convenio-accent), black 32%);
}

.convenio-card__external {
  color: var(--vincula-dark);
}

.convenios-empty {
  padding: 72px 24px;
  border: 1px dashed #c8c8c8;
  border-radius: 22px;
  background: #faf9fc;
  text-align: center;
}

.convenios-empty > span {
  color: var(--vincula-purple);
  font-size: 2.5rem;
}

.convenios-empty h3 {
  margin: 12px 0 8px;
  font-size: 1.5rem;
  font-weight: 850;
}

.convenios-empty p {
  margin-bottom: 18px;
  color: var(--vincula-dark);
}

.convenios-empty a {
  color: var(--vincula-purple);
  font-weight: 800;
}

/* Detalle de convenio */
.convenio-show__hero {
  padding: 62px 0 80px;
}

.convenio-show__hero::before {
  top: -200px;
  right: -110px;
}

.convenio-show__breadcrumbs {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  margin: 0 0 46px;
}

.convenio-show__hero .row {
  position: relative;
  z-index: 1;
}

.convenio-show__hero h1 {
  margin: 21px 0 17px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 850;
  line-height: 1.03;
  letter-spacing: -3px;
}

.convenio-show__hero .col-lg-8 > p {
  max-width: 650px;
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.75;
}

.convenio-show__logo {
  display: grid;
  width: min(245px, 70vw);
  aspect-ratio: 1;
  margin-left: auto;
  place-items: center;
  padding: 35px;
  border: 1px solid rgb(0 0 0 / 15%);
  border-radius: 50%;
  background: rgb(255 255 255 / 13%);
  box-shadow: 0 0 0 20px rgb(255 255 255 / 4%);
}

.convenio-show__logo img {
  width: 100%;
  max-height: 145px;
  object-fit: contain;
}

.convenio-show__logo > span {
  font-size: 4rem;
  font-weight: 850;
}

.convenio-show__content {
  padding: 92px 0 105px;
}

.convenio-show__content article h2 {
  margin: 5px 0 25px;
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -2px;
}

.convenio-show__description {
  color: var(--vincula-dark);
  font-size: 1.04rem;
  line-height: 1.9;
}

.convenio-show__summary {
  position: sticky;
  top: 112px;
  padding: 28px;
  border: 1px solid #ded9e8;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 17px 50px rgb(44 33 88 / 12%);
}

.convenio-show__summary h2 {
  margin-bottom: 21px;
  font-size: 1.2rem;
  font-weight: 850;
}

.convenio-show__summary > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 0;
  border-block: 1px solid #ebe8ef;
}

.convenio-show__summary > div span {
  color: var(--vincula-dark);
  font-size: .74rem;
}

.convenio-show__summary > div strong {
  font-size: .78rem;
  text-align: right;
}

.convenio-show__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 50px;
  background: var(--vincula-yellow);
  color: #000;
  font-size: .79rem;
  font-weight: 850;
  text-decoration: none;
}

.convenio-show__back,
.convenio-show__edit {
  display: block;
  margin-top: 18px;
  color: var(--vincula-purple);
  font-size: .76rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.convenio-show__edit {
  margin-top: 10px;
}

@media (max-width: 1199.98px) {
  .convenio-card__visual {
    width: 34%;
    min-width: 225px;
  }
}

@media (max-width: 991.98px) {
  .convenios-catalogo { padding: 75px 0 88px; }
  .convenio-show__logo { margin: 10px auto 0; }
  .convenio-show__content { padding: 74px 0 88px; }
  .convenio-show__summary { position: static; }
}

@media (max-width: 767.98px) {
  .convenios-hero { padding: 68px 0 58px; }
  .convenios-hero h1,
  .convenio-show__hero h1 { letter-spacing: -2px; }
  .convenios-heading,
  .convenios-filtros { align-items: stretch; flex-direction: column; }
  .convenios-filtros__search,
  .convenios-filtros__order { flex-basis: auto; width: 100%; }
  .convenios-filtros__submit { width: 100%; }
  .convenios-filtros__clear { min-height: auto; text-align: center; }
  .convenio-card { flex-direction: column; }
  .convenio-card__visual {
    width: 100%;
    min-width: 0;
    min-height: 230px;
  }
}

/* Contraste sobre fondos morados */
.convenios-hero,
.convenio-show__hero {
  color: #fff;
}

.convenios-hero .convenios-eyebrow,
.convenio-show__hero .convenios-eyebrow {
  border-color: var(--vincula-yellow);
  background: var(--vincula-yellow);
  color: #000;
}

.convenios-hero .convenios-breadcrumbs,
.convenios-hero .convenios-breadcrumbs a,
.convenio-show__hero .convenios-breadcrumbs,
.convenio-show__hero .convenios-breadcrumbs a {
  color: #fff;
}

.convenios-hero__content > p,
.convenio-show__hero .col-lg-8 > p {
  color: rgb(255 255 255 / 88%);
}

/* Ajuste de legibilidad solicitado para tarjetas */
.convenio-card { min-height: 320px; }
.convenio-card__body { padding: 32px 29px 27px; }
.convenio-card__eyebrow { font-size: .76rem; line-height: 1.4; }
.convenio-card h3 { font-size: 1.52rem; line-height: 1.28; }
.convenio-card__body > p { font-size: .96rem; line-height: 1.75; }
.convenio-card__details,
.convenio-card__external { font-size: .88rem; }
