.cpmx-comms {
  --cpmx-comms-navy: #06145f;
  --cpmx-comms-blue: #0758c9;
  --cpmx-comms-sky: #1595de;
  --cpmx-comms-ink: #111827;
  --cpmx-comms-muted: #58677b;
  --cpmx-comms-line: #d7e6f7;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--cpmx-comms-ink);
  font-family: inherit;
  scroll-margin-top: 32px;
}

.cpmx-comms *,
.cpmx-comms *::before,
.cpmx-comms *::after {
  box-sizing: border-box;
}

.cpmx-comms__list {
  display: grid;
  width: 100%;
  gap: clamp(22px, 3vw, 34px);
}

.cpmx-comms__card {
  position: relative;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  width: 100%;
  min-height: 300px;
  margin: 0;
  border: 1px solid var(--cpmx-comms-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(6, 20, 95, .08);
  transition: border-color .22s ease, box-shadow .22s ease;
}

.cpmx-comms__card::before {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--cpmx-comms-navy), var(--cpmx-comms-blue), var(--cpmx-comms-sky));
  content: "";
  pointer-events: none;
}

.cpmx-comms__card:hover {
  border-color: rgba(7, 88, 201, .35);
  box-shadow: 0 20px 48px rgba(6, 20, 95, .12);
}

.cpmx-comms__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(27px, 3.7vw, 46px) clamp(25px, 4.2vw, 52px);
  background:
    radial-gradient(circle at 0 100%, rgba(21, 149, 222, .08), transparent 31%),
    #ffffff;
}

.cpmx-comms__badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 28px;
  margin: 0 0 18px;
  padding: 5px 13px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--cpmx-comms-navy), var(--cpmx-comms-blue));
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
}

.cpmx-comms__title {
  max-width: 760px;
  margin: 0;
  color: var(--cpmx-comms-navy);
  font-size: clamp(23px, 2.5vw, 34px);
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.cpmx-comms__title a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.cpmx-comms__title a:hover,
.cpmx-comms__title a:focus-visible {
  color: var(--cpmx-comms-blue);
}

.cpmx-comms__summary {
  max-width: 780px;
  margin: 15px 0 0;
  color: var(--cpmx-comms-muted);
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 500;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.cpmx-comms__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px 23px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(215, 230, 247, .95);
  color: #607087;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}

.cpmx-comms__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cpmx-comms__meta-item svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: var(--cpmx-comms-blue);
}

.cpmx-comms__meta-item strong {
  color: var(--cpmx-comms-navy);
  font-weight: 750;
}

.cpmx-comms__media {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  border-left: 1px solid var(--cpmx-comms-line);
  background: linear-gradient(145deg, #eaf5ff, #f9fcff);
}

.cpmx-comms__image-link {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.cpmx-comms .cpmx-comms__image {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100%;
  margin: 0 !important;
  border: 0;
  object-fit: cover !important;
  object-position: 50% 50% !important;
}

.cpmx-comms .cpmx-comms__image--contain {
  padding: clamp(28px, 5vw, 64px);
  background: #ffffff;
  object-fit: contain !important;
}

.cpmx-comms__media.has-image-error {
  display: grid;
  min-height: 260px;
  background:
    radial-gradient(circle at 50% 50%, rgba(21, 149, 222, .14), transparent 34%),
    linear-gradient(145deg, #eef7ff, #ffffff);
  place-items: center;
}

.cpmx-comms__media.has-image-error::after {
  max-width: 230px;
  color: var(--cpmx-comms-muted);
  content: "COPARMEX CDMX";
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
}

.cpmx-comms__pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: clamp(36px, 5vw, 60px) 0 0;
}

.cpmx-comms__page {
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--cpmx-comms-line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--cpmx-comms-navy);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  place-items: center;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

a.cpmx-comms__page:hover,
a.cpmx-comms__page:focus-visible,
.cpmx-comms__page.is-current {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cpmx-comms-navy), var(--cpmx-comms-blue));
  color: #ffffff;
}

.cpmx-comms__page--arrow {
  font-size: 20px;
}

.cpmx-comms__ellipsis {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 25px;
  color: var(--cpmx-comms-muted);
  font-weight: 750;
}

.cpmx-comms__title a:focus-visible,
.cpmx-comms__page:focus-visible {
  outline: 3px solid rgba(21, 149, 222, .34);
  outline-offset: 4px;
}

.cpmx-comms__empty {
  display: grid;
  width: 100%;
  min-height: 220px;
  padding: 40px 24px;
  border: 1px solid var(--cpmx-comms-line);
  border-radius: 20px;
  background: linear-gradient(145deg, #f8fcff, #eef6ff);
  color: var(--cpmx-comms-muted);
  place-content: center;
  text-align: center;
}

.cpmx-comms__empty strong {
  color: var(--cpmx-comms-navy);
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1.25;
}

.cpmx-comms__empty span {
  max-width: 680px;
  margin-top: 10px;
  line-height: 1.65;
}

.cpmx-comms__screen-reader {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Tableta horizontal */
@media (min-width: 900px) and (max-width: 1100px) {
  .cpmx-comms__card {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  }

  .cpmx-comms__content {
    padding: 31px 32px;
  }

}

/* Tableta vertical y celular */
@media (max-width: 899px) {
  .cpmx-comms__card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .cpmx-comms__content {
    order: 2;
  }

  .cpmx-comms__media {
    order: 1;
    min-height: 0;
    border-bottom: 1px solid var(--cpmx-comms-line);
    border-left: 0;
    aspect-ratio: 16 / 9;
  }

  .cpmx-comms__card::before {
    right: 0;
    bottom: auto;
    width: auto;
    height: 6px;
  }

  .cpmx-comms__meta {
    margin-top: 23px;
    padding-top: 20px;
  }
}

/* Celular */
@media (max-width: 640px) {
  .cpmx-comms__list {
    gap: 19px;
  }

  .cpmx-comms__card {
    border-radius: 17px;
  }

  .cpmx-comms__content {
    padding: 25px 20px 23px;
  }

  .cpmx-comms__media {
    aspect-ratio: 4 / 3;
  }

  .cpmx-comms__badge {
    margin-bottom: 14px;
  }

  .cpmx-comms__title {
    font-size: clamp(22px, 7vw, 28px);
  }

  .cpmx-comms__summary {
    margin-top: 12px;
    line-height: 1.6;
  }

  .cpmx-comms__meta {
    display: grid;
    gap: 10px;
    margin-top: 19px;
    padding-top: 17px;
  }

  .cpmx-comms__pagination {
    gap: 7px;
    margin-top: 34px;
  }

  .cpmx-comms__page {
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpmx-comms__card,
  .cpmx-comms__title a,
  .cpmx-comms__page {
    transition-duration: .01ms !important;
  }
}
