#linaje {
  padding: var(--section-padding) 0;
  background: var(--stone);
}

.masters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.master-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  cursor: pointer;
}

.master-portrait {
  aspect-ratio: 3/4;
  background: var(--stone-dark);
  position: relative;
  overflow: hidden;
}

.master-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-silk);
  filter: brightness(0.95) saturate(0.9) sepia(0.05);
}

.master-card:hover .master-portrait img {
  transform: scale(1.04);
}

.master-portrait-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem .5rem .5rem;
  background: linear-gradient(to top,
      rgb(22, 5, 7) 0%,
      rgba(22, 5, 7, 0.8) 60%,
      transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  text-align: center;
}

.master-card:hover .master-portrait-overlay {
  opacity: 1;
}

.master-portrait-overlay p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(244, 240, 235, 0.75);
}

.master-role {
  font-size: 0.58rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.master-name {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 200;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.block-master-bio p {
  font-size: 1.10rem;
  line-height: 1.8;
  color: var(--ink);
  opacity: 0.85;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
  text-align: justify;
}

.master-bio {
  font-size: 0.83rem;
  line-height: 1.75;
  color: var(--ink-80);
}

.master-card.featured .master-portrait {
  aspect-ratio: 3/4;
}

.master-card.featured .master-role {
  color: var(--terra);
}

.master-card.featured .master-name {
  font-size: 1.8rem;
}

@media (max-width: 1024px) {
  .masters-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .masters-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   INTERNAL PAGE: EL ROSARIO DE ORO (EDITORIAL LAYOUT)
   ========================================================================== */

.inner-page .block-master-bio h4 {
  font-family: var(--f-display);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--saffron);
  margin: 3.5rem 0 1.2rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(198, 155, 109, 0.2);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.editorial-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 5rem;
  align-items: start;
  margin-bottom: 4rem;
}

.editorial-full-width {
  grid-column: 1 / -1;
  margin-top: 5rem;
  padding: 5rem 15%;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.5s ease;
}

.editorial-full-width-text {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.editorial-full-width-text p {
  font-size: 1.10rem;
  line-height: 1.85;
  text-align: justify;
  hyphens: auto;
  max-width: 100%;
}

/* Variantes de Fondo para Cierres (Legacy Quotes) */
.legacy-quote.bg-cedar {
  background-color: var(--cedar) !important;
}

.legacy-quote.bg-ink {
  background-color: var(--ink) !important;
}

.legacy-quote.bg-cedar .bq-text,
.legacy-quote.bg-ink .bq-text {
  color: var(--parchment);
}

.spaced-text {
  letter-spacing: 0.12em;
  font-weight: 300;
  line-height: 2.2;
  text-align: center;
  font-size: 1.10rem;
  color: var(--ink);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
}

/* Ajustes de flujo de texto */
.block-master-bio p {
  margin-bottom: 1.8rem;
  font-size: 1.10rem;
  line-height: 1.85;
  text-align: justify;
  hyphens: auto;
}

.editorial-grid-row .block-master-portrait {
  margin-bottom: 0;
  background: transparent;
  margin-top: 50px;
}

.editorial-grid-row .block-master-portrait-img {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px;
}

@media (max-width: 1024px) {
  .editorial-grid-row {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}