/* Ebook patrimonial. Cargar después de los estilos compartidos del sitio. */
.ep-page,
.ep-promo {
  --ep-ink: #142e43;
  --ep-muted: #506474;
  --ep-blue: #186a9b;
  --ep-blue-dark: #11517a;
  --ep-line: #dce5eb;
  --ep-tint: #f3f6f7;
  --ep-warm: #f6f4ef;
  color: var(--ep-ink);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-align: left;
  overflow-wrap: break-word;
}

.ep-page *,
.ep-promo * {
  box-sizing: border-box;
}

.ep-page .ep-wrap {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.ep-page .ep-section {
  margin: 0;
  padding: 76px 0;
  background: #fff;
  color: var(--ep-ink);
  scroll-margin-top: 100px;
}

.ep-page .ep-tint { background: var(--ep-tint); }
.ep-page .ep-warm { background: var(--ep-warm); }

.ep-page h1,
.ep-page h2,
.ep-page h3,
.ep-promo h2,
.ep-promo h3 {
  color: var(--ep-ink);
  font-family: "Raleway", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.ep-page .ep-title {
  margin: 0 0 22px;
  font-size: clamp(34px, 3.6vw, 49px);
  line-height: 1.13;
}

.ep-page h2 {
  margin: 0 0 20px;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.2;
}

.ep-page h3 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.ep-page p,
.ep-promo p {
  margin: 0 0 18px;
  color: var(--ep-muted);
  line-height: 1.7;
}

.ep-page p.ep-eyebrow,
.ep-promo p.ep-eyebrow {
  margin: 0 0 14px;
  color: var(--ep-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.6;
  text-transform: uppercase;
}

.ep-page .ep-hero {
  margin: 0;
  padding: 66px 0 72px;
  color: var(--ep-ink);
  background: linear-gradient(115deg, #fff 22%, var(--ep-warm) 100%);
}

.ep-page .ep-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  align-items: center;
  gap: 64px;
}

.ep-page .ep-hero-copy,
.ep-page .ep-section-heading,
.ep-page .ep-author-copy,
.ep-promo .ep-promo-copy {
  min-width: 0;
}

.ep-page p.ep-subtitle {
  margin-bottom: 16px;
  color: var(--ep-ink);
  font-size: 21px;
  line-height: 1.45;
}

.ep-page p.ep-byline {
  margin-bottom: 24px;
  font-size: 15px;
  font-weight: 600;
}

.ep-page p.ep-intro { margin-bottom: 28px; }

.ep-page .ep-cover-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 34px 26px 22px;
  border: 1px solid #e4e2dc;
  border-radius: 18px;
  background: #eeede7;
}

.ep-page .ep-cover {
  display: block;
  width: 100%;
  max-width: 350px;
  height: auto;
  aspect-ratio: 1600 / 2274;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 9px 16px 28px rgb(20 46 67 / 17%);
}

.ep-page .ep-cover-stage figcaption {
  max-width: 320px;
  margin-top: 24px;
  color: var(--ep-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.ep-page p.ep-price,
.ep-promo p.ep-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 13px;
  margin: 0 0 18px;
  color: var(--ep-ink);
  line-height: 1.4;
}

.ep-page .ep-price strong,
.ep-promo .ep-price strong {
  font-size: 28px;
  font-weight: 700;
}

.ep-page .ep-price span,
.ep-promo .ep-price span {
  color: var(--ep-muted);
  font-size: 14px;
}

.ep-page .ep-actions,
.ep-promo .ep-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.ep-page a.ep-button,
.ep-promo a.ep-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  max-width: 100%;
  padding: 13px 21px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  transition: background-color .16s ease, border-color .16s ease;
}

.ep-page a.ep-primary,
.ep-promo a.ep-primary {
  border-color: var(--ep-blue);
  color: #fff;
  background: var(--ep-blue);
}

.ep-page a.ep-primary:hover,
.ep-promo a.ep-primary:hover {
  border-color: var(--ep-blue-dark);
  color: #fff;
  background: var(--ep-blue-dark);
  text-decoration: none;
}

.ep-page a.ep-secondary,
.ep-promo a.ep-secondary {
  border-color: #aebfca;
  color: var(--ep-blue-dark);
  background: #fff;
}

.ep-page a.ep-secondary:hover,
.ep-promo a.ep-secondary:hover {
  border-color: var(--ep-blue);
  color: var(--ep-blue-dark);
  background: #edf4f8;
  text-decoration: none;
}

.ep-page a:focus-visible,
.ep-page summary:focus-visible,
.ep-promo a:focus-visible {
  outline: 3px solid #bd7e1c;
  outline-offset: 4px;
}

.ep-page p.ep-note,
.ep-promo p.ep-note {
  margin: 13px 0 0;
  color: var(--ep-muted);
  font-size: 13px;
  line-height: 1.6;
}

.ep-page .ep-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 70px;
}

.ep-page .ep-heading-wide { max-width: 700px; margin-bottom: 32px; }
.ep-page .ep-section-heading p:last-child { margin-bottom: 0; }

.ep-page .ep-audience-list,
.ep-page .ep-included-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ep-page .ep-audience-list li {
  margin: 0 0 22px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--ep-line);
}

.ep-page .ep-audience-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.ep-page .ep-audience-list strong,
.ep-page .ep-included-list strong { display: block; margin-bottom: 6px; color: var(--ep-ink); font-size: 18px; line-height: 1.4; }
.ep-page .ep-audience-list span,
.ep-page .ep-included-list span { display: block; color: var(--ep-muted); font-size: 16px; line-height: 1.65; }

.ep-page .ep-learning-grid,
.ep-page .ep-purchase-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ep-page .ep-learning-grid > li {
  min-width: 0;
  margin: 0;
  padding: 27px;
  border: 1px solid var(--ep-line);
  border-radius: 10px;
  background: #fff;
}

.ep-page .ep-learning-grid p,
.ep-page .ep-purchase-steps p { margin: 0; font-size: 16px; }

.ep-page .ep-step-number {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--ep-blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.ep-page .ep-included-panel {
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--ep-line);
  border-radius: 12px;
  background: var(--ep-tint);
}

.ep-page .ep-included-list li { margin: 0 0 22px; }
.ep-page .ep-included-list li:last-child { margin-bottom: 0; }
.ep-page p.ep-reference-note { margin-top: 22px; font-size: 15px; }
.ep-page p.ep-workbook-note { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #ccd9e1; color: var(--ep-ink); font-size: 14px; }

.ep-page .ep-content-buy {
  margin-top: 38px;
  padding-top: 32px;
  border-top: 1px solid var(--ep-line);
}

.ep-page .ep-purchase-steps { gap: 40px; }
.ep-page .ep-purchase-steps > li { min-width: 0; margin: 0; padding: 0; }
.ep-page .ep-purchase-steps .ep-step-number { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #b5c8d3; border-radius: 50%; background: #fff; }

.ep-page .ep-author {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 70px;
  padding: 36px 0;
  border-top: 1px solid var(--ep-line);
  border-bottom: 1px solid var(--ep-line);
}

.ep-page p.ep-author-role { color: var(--ep-muted); font-size: 15px; }
.ep-page .ep-author-copy p:last-child { margin-bottom: 0; }

.ep-page .ep-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 70px;
  align-items: start;
}

.ep-page .ep-faq-list { min-width: 0; border-top: 1px solid #c9d6df; }
.ep-page .ep-faq { margin: 0; border-bottom: 1px solid #c9d6df; }
.ep-page .ep-faq summary { position: relative; padding: 21px 28px 21px 0; color: var(--ep-ink); font-size: 17px; font-weight: 700; line-height: 1.5; cursor: pointer; list-style: none; }
.ep-page .ep-faq summary::-webkit-details-marker { display: none; }
.ep-page .ep-faq summary::after { position: absolute; top: 21px; right: 2px; content: "+"; color: var(--ep-blue); font-size: 23px; font-weight: 400; line-height: 1; }
.ep-page .ep-faq[open] summary::after { content: "−"; }
.ep-page .ep-faq summary:hover { color: var(--ep-blue-dark); }
.ep-page .ep-faq-answer { padding: 0 28px 21px 0; }
.ep-page .ep-faq-answer p { margin: 0; font-size: 16px; }

.ep-page .ep-closing { background: var(--ep-warm); }
.ep-page .ep-closing-inner { max-width: 800px; text-align: center; }
.ep-page p.ep-closing-copy { max-width: 620px; margin: 0 auto 25px; }
.ep-page .ep-closing .ep-actions,
.ep-page .ep-closing .ep-price { justify-content: center; }
.ep-page p.ep-disclosure,
.ep-promo p.ep-disclosure { margin: 30px 0 0; padding-top: 24px; border-top: 1px solid var(--ep-line); color: var(--ep-muted); font-size: 13px; line-height: 1.7; }

/* Tarjeta compartida: Home, Publicaciones, Fideicomisos y artículos. */
section.ep-promo,
div.ep-promo {
  margin: 0;
  padding: 58px 0;
  background: var(--ep-warm);
  color: var(--ep-ink);
}

.ep-promo .ep-promo-inner {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
  padding: 34px 42px;
  border: 1px solid #dcdedb;
  border-radius: 12px;
  background: #fff;
}

.ep-promo img.ep-promo-cover {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
  aspect-ratio: 1600 / 2274;
  margin: 0;
  border: 0;
  border-radius: 2px;
  object-fit: contain;
  box-shadow: 5px 10px 20px rgb(20 46 67 / 14%);
}

.ep-promo .ep-promo-copy h2,
.ep-promo .ep-promo-copy h3 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--ep-ink);
  font-size: clamp(25px, 2.4vw, 33px);
  line-height: 1.2;
}

.ep-promo .ep-promo-copy > p:not([class]) { max-width: 750px; font-size: 16px; }
.ep-promo .ep-price strong { font-size: 24px; }
.ep-promo p.ep-disclosure { margin-top: 20px; padding-top: 16px; }

section.ep-promo.ep-promo-compact,
div.ep-promo.ep-promo-compact { margin: 32px 0 0; padding: 0; background: transparent; }
.ep-promo.ep-promo-compact .ep-promo-inner { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); width: 100%; gap: 25px; padding: 26px; background: var(--ep-warm); }
.ep-promo.ep-promo-compact img.ep-promo-cover { max-width: 120px; }
.ep-promo.ep-promo-compact .ep-promo-copy h2,
.ep-promo.ep-promo-compact .ep-promo-copy h3 { margin-bottom: 12px; font-size: 24px; }
.ep-promo.ep-promo-compact p.ep-eyebrow { margin-bottom: 10px; font-size: 11px; }
.ep-promo.ep-promo-compact .ep-promo-copy > p:not([class]) { margin-bottom: 14px; font-size: 15px; }
.ep-promo.ep-promo-compact .ep-price { margin-bottom: 14px; }
.ep-promo.ep-promo-compact .ep-price strong { font-size: 22px; }
.ep-promo.ep-promo-compact a.ep-button { padding: 11px 15px; font-size: 14px; }

@media (max-width: 1050px) {
  .ep-page .ep-hero-grid { gap: 38px; }
  .ep-page .ep-split,
  .ep-page .ep-author,
  .ep-page .ep-faq-layout { gap: 40px; }
  .ep-page .ep-learning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-page .ep-cover-stage { padding: 28px 20px 20px; }
}

@media (max-width: 767px) {
  .ep-page .ep-wrap { width: calc(100% - 36px); }
  .ep-page .ep-section { padding: 48px 0; }
  .ep-page .ep-hero { padding: 38px 0 45px; }
  .ep-page .ep-hero-grid,
  .ep-page .ep-split,
  .ep-page .ep-author,
  .ep-page .ep-faq-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .ep-page .ep-title { font-size: clamp(32px, 8.5vw, 43px); }
  .ep-page p.ep-subtitle { font-size: 19px; }
  .ep-page .ep-cover-stage { max-width: 360px; width: 100%; margin-inline: auto; padding: 27px 25px 20px; }
  .ep-page .ep-cover { max-width: 290px; }
  .ep-page .ep-heading-wide { margin-bottom: 27px; }
  .ep-page .ep-learning-grid,
  .ep-page .ep-purchase-steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ep-page .ep-learning-grid > li { padding: 24px; }
  .ep-page .ep-included-panel { padding: 25px; }
  .ep-page .ep-purchase-steps { gap: 28px; }
  .ep-page .ep-author { padding: 27px 0; }
  .ep-page .ep-closing-inner { text-align: left; }
  .ep-page .ep-closing .ep-actions,
  .ep-page .ep-closing .ep-price { justify-content: flex-start; }
  .ep-page p.ep-closing-copy { margin-left: 0; }
  section.ep-promo,
  div.ep-promo { padding: 38px 0; }
  .ep-promo .ep-promo-inner { grid-template-columns: minmax(0, 1fr); width: calc(100% - 36px); gap: 25px; padding: 27px 24px; }
  .ep-promo img.ep-promo-cover { max-width: 155px; }
  .ep-promo.ep-promo-compact .ep-promo-inner { grid-template-columns: minmax(0, 1fr); width: 100%; gap: 23px; padding: 24px; }
  .ep-promo.ep-promo-compact img.ep-promo-cover { max-width: 110px; }
}

@media (max-width: 420px) {
  .ep-page .ep-actions,
  .ep-promo .ep-actions { align-items: stretch; flex-direction: column; }
  .ep-page a.ep-button,
  .ep-promo a.ep-button { width: 100%; }
  .ep-page .ep-price span,
  .ep-promo .ep-price span { flex-basis: 100%; }
  .ep-page .ep-title { font-size: 32px; }
  .ep-page .ep-included-panel,
  .ep-page .ep-learning-grid > li { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ep-page a.ep-button,
  .ep-promo a.ep-button { transition: none; }
}

/* Two paid guides share the existing visual system. */
.ep-page.ep-sociedades .ep-cover, .ep-sociedades img.ep-promo-cover { aspect-ratio: 1600 / 2232; }
.ep-library .ep-library-heading, .ep-library .ep-library-grid { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.ep-library .ep-library-heading { margin-bottom: 28px; }
.ep-library .ep-library-heading h2 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
.ep-library .ep-library-heading p { margin: 0; }
.ep-library .ep-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ep-library .ep-library-card { width: 100%; grid-template-columns: 110px minmax(0, 1fr); gap: 25px; padding: 30px; align-items: start; }
.ep-library .ep-library-card .ep-promo-copy { display: flex; flex-direction: column; height: 100%; }
.ep-library .ep-library-card .ep-promo-copy h3 { font-size: 27px; }
.ep-library .ep-library-card .ep-price { margin-top: auto; padding-top: 6px; }
.ep-library .ep-library-card .ep-promo-cover { max-width: 110px; }
.ep-library .ep-library-card .ep-actions { flex-direction: column; align-items: stretch; }
.ep-library .ep-library-card a.ep-button { padding: 12px 14px; }
@media (max-width: 1000px) {
 .ep-library .ep-library-grid { grid-template-columns: minmax(0, 1fr); }
 .ep-library .ep-library-card { grid-template-columns: 155px minmax(0, 1fr); }
 .ep-library .ep-library-card .ep-promo-cover { max-width: 155px; }
 .ep-library .ep-library-card .ep-actions { flex-direction: row; }
}
@media (max-width: 767px) {
 .ep-library .ep-library-heading, .ep-library .ep-library-grid { width: calc(100% - 36px); }
 .ep-library .ep-library-card { grid-template-columns: minmax(0, 1fr); padding: 25px; }
 .ep-library .ep-library-card .ep-promo-cover { max-width: 135px; }
 .ep-library .ep-library-card .ep-actions { flex-direction: column; }
}
