/* Craft CMS: botones CTA se adaptan al largo del texto editable */

a.btn.btn--pill-arrow,
button.btn.btn--pill-arrow,
.footer-cta.btn--pill-arrow,
.servicios-features__cta.btn--pill-arrow,
.trabaja-hero__cta.btn--pill-arrow,
.why-cta.btn--pill-arrow,
.hero-cta.btn--pill-arrow {
  --btn-pill-arrow-width: auto;
  width: auto;
  max-width: min(100%, 32rem);
  min-width: 0;
  box-sizing: border-box;
}

a.btn.btn--pill-arrow[data-pill-fit],
button.btn.btn--pill-arrow[data-pill-fit],
.footer-cta.btn--pill-arrow[data-pill-fit],
.servicios-features__cta.btn--pill-arrow[data-pill-fit],
.trabaja-hero__cta.btn--pill-arrow[data-pill-fit] {
  width: var(--btn-pill-arrow-width);
}

a.btn.btn--pill-arrow .btn__label,
button.btn.btn--pill-arrow .btn__label,
.footer-cta.btn--pill-arrow .btn__label,
.servicios-features__cta.btn--pill-arrow .btn__label {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

/* Con ancho adaptado, el label va a la izquierda (como “Quiero afiliarme”) */
.trabaja-hero__cta.btn--pill-arrow .btn__label {
  left: 20px;
  transform: translateY(-50%);
}

.trabaja-hero__cta.btn--pill-arrow:hover .btn__label {
  transform: translateY(-50%) translateX(var(--btn-pill-arrow-label-shift));
}

.btn--hero-outline,
.btn--plan-outline,
.btn--plan-filled,
.btn--ghost,
.btn--solid,
.plan-detail-card__cta,
.cv-modal__submit {
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Los de tarjeta de plan siguen a ancho de tarjeta */
.plan-card .btn--plan-outline,
.plan-card .btn--plan-filled {
  width: 100%;
}

.btn--affiliate-compact {
  width: auto !important;
  min-width: 0;
  max-width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  a.btn.btn--pill-arrow,
  button.btn.btn--pill-arrow,
  .footer-cta.btn--pill-arrow,
  .servicios-features__cta.btn--pill-arrow,
  .trabaja-hero__cta.btn--pill-arrow,
  a.btn.btn--pill-arrow[data-pill-fit],
  button.btn.btn--pill-arrow[data-pill-fit] {
    width: 100%;
    max-width: none;
  }
}

/* Novedades: ocultar cards al filtrar / buscar */
.novedades-card.is-hidden,
.novedades-featured.is-hidden,
.novedades-featured-card.is-hidden {
  display: none !important;
}

/* Featured: tope de alto en la imagen para que no estire la card */
.novedades-featured-card__image-frame {
  height: 378px;
  max-height: 378px;
  min-height: 0;
}

.novedades-featured-card__image img {
  width: 100%;
  height: 100%;
  max-height: 378px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  .novedades-featured-card__image-frame {
    height: 220px;
    max-height: 220px;
  }

  .novedades-featured-card__image img {
    max-height: 220px;
  }
}

.novedades-empty {
  text-align: center;
  padding: 48px 20px 24px;
}

.novedades-empty.is-hidden {
  display: none !important;
}

.novedades-empty__title {
  margin: 0 0 8px;
  color: #294647;
  font-size: 1.25rem;
  font-weight: 600;
}

.novedades-empty__text {
  margin: 0;
  color: #525252;
  font-size: 1rem;
}

/* Sin newsletter debajo: más aire antes del footer */
.page-novedades .novedades-section {
  padding-bottom: 96px;
}

.page-novedades-detalle .nd-related-outer {
  padding-bottom: 96px;
}

/* Tipografía del cuerpo (CMS plain text → mismos estilos que el front) */
.nd-article-body > p,
.nd-article-body .nd-p {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.5px;
  color: #294647;
}

.nd-article-body > h2,
.nd-article-body .nd-h2 {
  margin: 32px 0 16px;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.5px;
  color: #294647;
}

.nd-article-body > ul,
.nd-article-body .nd-list {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nd-article-body > ul li,
.nd-article-body .nd-list li {
  position: relative;
  padding: 0 0 0 16px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.5px;
  color: #294647;
}

.nd-article-body > ul li::before,
.nd-article-body .nd-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: #294647;
}

.nd-cta--text-only {
  grid-template-columns: 1fr;
}

.nd-cta--text-only .nd-cta__content {
  padding-left: 40px;
}
