.ceys-news-inline-image {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 8px 8px;
  border-radius: 8px;
  vertical-align: middle;
}

figure.ceys-news-inline-image.alignnone {
  width: auto !important;
  max-width: 320px !important;
}

.ceys-news-inline-image.alignleft {
  float: left;
  max-width: min(48%, 420px);
  margin: 6px 24px 18px 0;
}

.ceys-news-inline-image.alignright {
  float: right;
  max-width: min(48%, 420px);
  margin: 6px 0 18px 24px;
}

.ceys-news-inline-image.aligncenter {
  display: block;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.ceys-news-inline-image img {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  border-radius: 8px;
}

.ceys-news-content::after {
  content: "";
  display: block;
  clear: both;
}

/* Inicio: Novedades vive en una franja propia, separada de la botonera blanca. */
.home .ceys-news-section {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 54px 0 62px !important;
  background: #1d3a6c !important;
  box-sizing: border-box;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}

.home .ceys-news-heading {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 26px !important;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
}

.home .ceys-news-heading h2 {
  margin: 0;
  color: #fff !important;
  font-weight: 500 !important;
}

.home .ceys-news-heading p {
  margin: 0;
  color: rgba(255, 255, 255, .84) !important;
}

.home .ceys-news-section .ceys-news-card {
  border-color: #5fb030;
}

.ceys-news-listing,
.ceys-news-grid {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.ceys-news-section-head {
  margin: 24px 0 16px;
}

.ceys-news-section-head h2 {
  margin: 0;
  color: #173047;
  font-size: 28px;
  font-weight: 900;
}

.ceys-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.ceys-news-grid-home {
  width: 100%;
}

.ceys-home-news-more {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 0;
  text-align: center;
}

.ceys-home-news-more a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  color: #fff !important;
  background: #5fb030 !important;
  border: 2px solid #5fb030;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(95, 176, 48, .24);
}

.ceys-home-news-more a:hover,
.ceys-home-news-more a:focus-visible {
  color: #1d3a6c !important;
  background: #fff !important;
  border-color: #fff;
  transform: translateY(-1px);
}

.home .ceys-news-actions a {
  color: #fff !important;
  background: #5fb030 !important;
  border: 2px solid #5fb030 !important;
}

.home .ceys-news-actions a:hover,
.home .ceys-news-actions a:focus-visible {
  color: #1d3a6c !important;
  background: #fff !important;
  border-color: #fff !important;
}

.ceys-news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 39, 63, .08);
}

.ceys-news-card-media,
.ceys-news-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  color: #fff;
  background: linear-gradient(135deg, #5fb030, #1d3a6c);
  font-weight: 900;
  text-decoration: none;
}

.ceys-news-card-media img,
.ceys-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ceys-news-card-body,
.ceys-news-content {
  padding: 18px;
}

.ceys-news-card-body,
.ceys-news-card > .ceys-news-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.ceys-news-card-body small,
.ceys-news-meta {
  color: #1d3a6c;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.ceys-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.ceys-news-card-body h3,
.ceys-news-content h3 {
  margin: 8px 0 10px;
  color: #173047;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.ceys-news-card-body h3 a,
.ceys-news-content h3 a {
  color: inherit;
  text-decoration: none;
}

.ceys-news-card-body p,
.ceys-news-content p {
  margin: 0 0 14px;
  color: #4f5f6f;
  line-height: 1.55;
}

.ceys-news-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  color: #fff;
  background: #1d3a6c;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-end;
  margin-top: auto;
}

.ceys-news-card-link:hover,
.ceys-news-card-link:focus-visible {
  color: #fff;
  background: #5fb030;
}

.ceys-news-back {
  clear: both;
  margin: 32px 0 8px;
  text-align: center;
}

.ceys-news-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  color: #fff;
  background: #1d3a6c;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.ceys-news-back a:hover,
.ceys-news-back a:focus-visible {
  color: #fff;
  background: #5fb030;
}

.ceys-news-empty {
  width: min(980px, calc(100% - 32px));
  margin: 24px auto;
  color: #4f5f6f;
}

.single-ceys_noticia .site-main {
  padding-top: 32px;
}

.single-ceys_noticia.ceys-news-has-banner .site-main {
  padding-top: 0;
}

.single-ceys_noticia.ceys-news-has-banner .page-header,
.single-ceys_noticia.ceys-news-has-banner .entry-title {
  display: none;
}

.ceys-news-hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  min-height: 260px;
  aspect-ratio: 16 / 5;
  margin: 0 calc(50% - 50vw) 36px;
  overflow: hidden;
  color: #fff;
  background: #1d3a6c;
}

.ceys-news-hero-media,
.ceys-news-hero-image {
  width: 100%;
  height: 100%;
}

.ceys-news-hero-media {
  position: absolute;
  inset: 0;
}

.ceys-news-hero-image {
  display: block;
  object-fit: cover;
  object-position: center;
}

.ceys-news-hero-titlebar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: rgba(27, 36, 43, .88);
  box-shadow: 0 -10px 28px rgba(15, 23, 42, .18);
}

.ceys-news-hero-title-inner {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
}

.ceys-news-hero-title-inner h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ceys-news-hero.is-without-image {
  min-height: 150px;
  aspect-ratio: auto;
  background: #1d3a6c;
}

/* CEyS mobile news centering: tarjetas en una columna sin corte lateral. */
@media (max-width: 680px) {
  .home .ceys-news-section {
    padding: 38px 0 44px !important;
  }

  .home .ceys-news-heading {
    width: min(100% - 24px, 480px);
    margin-bottom: 20px !important;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .home .ceys-news-heading h2 {
    font-size: 30px !important;
    line-height: 1.1;
  }

  .ceys-news-hero {
    min-height: 210px;
    aspect-ratio: 16 / 7;
    margin-bottom: 24px;
  }

  .ceys-news-hero-title-inner {
    width: calc(100% - 32px);
    padding: 13px 0;
  }

  .ceys-news-hero-title-inner h1 {
    font-size: 20px;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
  }

  .ceys-news-hero.is-without-image {
    min-height: 120px;
  }

  .ceys-news-listing,
  .ceys-news-grid,
  .ceys-home-news-more {
    width: min(calc(100vw - 32px), 360px) !important;
    max-width: min(calc(100vw - 32px), 360px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ceys-news-grid {
    grid-template-columns: 1fr !important;
    justify-items: stretch !important;
  }

  .ceys-news-card,
  .ceys-news-card * {
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .ceys-news-card-body h3,
  .ceys-news-content h3,
  .ceys-news-card-body p,
  .ceys-news-content p {
    overflow-wrap: break-word;
  }
}
