/* ══════════════════════════════════════════════════════════
   SERVICIO · /servicios-prl/ y sus subpáginas
   (template-parts/servicio.php y servicios.php)

   Bloques reutilizables en el editor (pestaña «Código»):
     <div class="svc-layout">
       <div class="svc-main"> … </div>
       <aside class="svc-aside"> precio + botón </aside>
     </div>
     <p class="svc-lead">      párrafo de entrada destacado
     <ul class="svc-features"> lista en tarjetas (primer <strong> = título)
     <ul class="svc-checklist">lista con marcas ✓
     <ol class="svc-steps">    pasos numerados
     <div class="svc-timeline"><div class="svc-hito"><p>fecha</p><p>texto</p></div></div>
     <p class="svc-note">      nota destacada
     <p class="svc-price">     precio (dentro de .svc-aside)
     <div class="svc-books"><section class="svc-book">…</section></div>
     <p class="svc-buy"><a class="btn-primary">…</a></p>
   ══════════════════════════════════════════════════════════ */

/* ── Cabecera ── */
.svc-hero {
    position: relative;
    background: var(--black);
    color: var(--text-on-dark);
    padding: clamp(2.5rem, 2rem + 3vw, 5rem) var(--gutter) clamp(3rem, 2.5rem + 3vw, 5.5rem);
    overflow: hidden;
    isolation: isolate;
}

.svc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(50% 80% at 85% 30%, rgba(255, 225, 0, 0.13), transparent 62%),
        repeating-linear-gradient(135deg, transparent 0 46px, rgba(255, 255, 255, 0.018) 46px 92px);
}

.svc-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8px;
    background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--black) 18px 36px);
}

.svc-hero__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.svc-migas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-on-dark-2);
    margin-bottom: 1.25rem;
}

.svc-migas a {
    color: var(--yellow);
}

.svc-migas a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.svc-hero h1 {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-on-dark);
    margin: 0;
}

.svc-hero__desc {
    margin: 1.25rem 0 0;
    max-width: 58ch;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-on-dark-2);
}

.svc-hero__img {
    position: relative;
    margin: 0;
}

.svc-hero__img::before {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 3px solid var(--yellow);
    border-radius: var(--radius-lg);
}

.svc-hero__img img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--ink-2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* ── Cuerpo ── */
.svc-body {
    background: var(--paper);
}

.svc-contenido {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--section) var(--gutter);
}

/* Sin maquetación propia: columna de lectura centrada */
.svc-contenido > :not(.svc-layout):not(.svc-books) {
    max-width: var(--container-narrow);
    margin-left: auto;
    margin-right: auto;
}

.svc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.svc-main > :first-child {
    margin-top: 0;
}

/* Ficha lateral: precio y botón */
.svc-aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    background: var(--ink);
    color: var(--text-on-dark-2);
    border-radius: var(--radius-lg);
    border-top: 5px solid var(--yellow);
    padding: 1.75rem 1.6rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.98rem;
    line-height: 1.65;
}

.entry-content .svc-aside p {
    margin: 0 0 1rem;
    color: var(--text-on-dark-2);
}

.entry-content .svc-aside strong,
.entry-content .svc-aside em {
    color: var(--text-on-dark);
}

.svc-aside__titulo {
    display: block;
    font-size: var(--fs-eyebrow);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 0.75rem;
}

.entry-content .svc-aside .svc-price {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.3;
    color: var(--text-on-dark);
}

.entry-content .svc-aside .svc-price strong {
    color: var(--yellow);
}

.entry-content .svc-aside a.btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    white-space: normal;
    text-align: center;
    background-image: none;
    color: var(--black);
}

.entry-content .svc-aside a:not(.btn-primary) {
    color: var(--yellow);
}

/* ── Párrafo de entrada ── */
.entry-content .svc-lead {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text);
}

/* ── Listas en tarjetas ── */
.entry-content ul.svc-features,
.entry-content ul.svc-checklist,
.entry-content ol.svc-steps {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 2.25rem;
}

.entry-content ul.svc-features li::before,
.entry-content ul.svc-checklist li::before {
    content: none;
}

.entry-content ul.svc-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.entry-content ul.svc-features li {
    margin: 0;
    padding: 1.25rem 1.35rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-left: 4px solid var(--yellow);
    border-radius: var(--radius);
    font-size: 0.98rem;
    line-height: 1.6;
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base);
}

.entry-content ul.svc-features li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.entry-content ul.svc-features li > strong:first-child,
.entry-content ul.svc-features li > h3:first-child {
    display: block;
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.entry-content ul.svc-features li > h3:first-child + p {
    margin: 0;
}

.entry-content ul.svc-checklist li {
    position: relative;
    padding: 0.55rem 0 0.55rem 2.25rem;
    margin: 0;
    border-bottom: 1px dashed var(--line);
}

.entry-content ul.svc-checklist li:last-child {
    border-bottom: 0;
}

.entry-content ul.svc-checklist li::after {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--black);
    font-size: 0.85rem;
    font-weight: 800;
}

/* ── Pasos numerados ── */
.entry-content ol.svc-steps {
    counter-reset: paso;
    display: grid;
    gap: 1.25rem;
}

.entry-content ol.svc-steps > li {
    counter-increment: paso;
    position: relative;
    margin: 0;
    padding: 1.4rem 1.5rem 1.4rem 4.75rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.entry-content ol.svc-steps > li::marker {
    content: none;
}

.entry-content ol.svc-steps > li::before {
    content: counter(paso, decimal-leading-zero);
    position: absolute;
    left: 1.4rem;
    top: 1.3rem;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--black);
    text-shadow: 2px 2px 0 var(--yellow);
}

.entry-content ol.svc-steps > li h3 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
}

.entry-content ol.svc-steps > li p {
    margin: 0;
}

/* ── Línea temporal ── */
.svc-timeline {
    position: relative;
    margin: 2rem 0 2.5rem;
    padding-left: 2rem;
}

.svc-timeline::before {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 3px;
    background: repeating-linear-gradient(180deg, var(--yellow) 0 12px, var(--black) 12px 24px);
    border-radius: 2px;
}

.svc-hito {
    position: relative;
    margin-bottom: 1.75rem;
}

.svc-hito:last-child {
    margin-bottom: 0;
}

.svc-hito::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--yellow);
    border: 3px solid var(--black);
}

.entry-content .svc-hito > p:first-child {
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--yellow-deep);
}

.entry-content .svc-hito > p:first-child strong {
    color: var(--yellow-deep);
}

.entry-content .svc-hito > p {
    margin-bottom: 0;
}

/* ── Nota destacada ── */
.entry-content .svc-note {
    padding: 1.1rem 1.35rem;
    background: var(--yellow-soft);
    border-left: 4px solid var(--yellow);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
    font-size: 0.97rem;
}

/* ── Libros ── */
.svc-books {
    display: grid;
    gap: clamp(3rem, 6vw, 5rem);
}

.svc-book {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    padding-bottom: clamp(3rem, 6vw, 5rem);
    border-bottom: 1px solid var(--line);
}

.svc-book:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.svc-book__portada {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
}

.entry-content .svc-book__portada img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.entry-content .svc-book__texto > h2:first-child {
    margin-top: 0;
}

.svc-buy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.75rem 0 0;
}

.entry-content .svc-buy a {
    background-image: none;
}

.entry-content .svc-buy a.btn-secondary {
    color: var(--ink);
}

.entry-content .svc-buy a.btn-secondary:hover {
    color: var(--text-on-dark);
}

/* ── Otros servicios ── */
.svc-otros {
    background: var(--paper-3);
    padding: var(--section) var(--gutter);
}

.svc-otros__inner {
    max-width: var(--container);
    margin: 0 auto;
}

.svc-otros h2 {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    margin-bottom: 2rem;
}

.svc-otros__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}

.svc-otro {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
    transition: transform var(--t-base) var(--ease), box-shadow var(--t-base), border-color var(--t-base);
}

.svc-otro:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 225, 0, 0.8);
}

.svc-otro__img {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--ink-2) center / cover no-repeat;
}

.svc-otro__titulo {
    display: block;
    padding: 1rem 1.15rem 0.35rem;
    font-weight: 700;
    line-height: 1.35;
}

.svc-otro__mas {
    display: block;
    padding: 0 1.15rem 1.1rem;
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--yellow-deep);
}

/* ── Índice /servicios-prl/ ── */
.site-main--servicios-indice #post-display {
    text-align: center;
    padding-bottom: clamp(1rem, 2vw, 2rem);
}

.site-main--servicios-indice #post-display h2::after {
    margin-left: auto;
    margin-right: auto;
}

.site-main--servicios-indice .recursos-listing {
    padding-top: clamp(2.5rem, 4vw, 4rem);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .svc-layout {
        grid-template-columns: 1fr;
    }

    .svc-aside {
        position: static;
    }
}

@media (max-width: 900px) {
    .svc-hero__inner {
        grid-template-columns: 1fr;
    }

    .svc-hero__img {
        max-width: 520px;
    }
}

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

    .svc-book__portada {
        position: static;
        max-width: 200px;
        margin: 0 auto;
    }

    .svc-buy .btn-primary,
    .svc-buy .btn-secondary {
        flex: 1 1 100%;
    }

    .entry-content ol.svc-steps > li {
        padding-left: 1.4rem;
        padding-top: 3.6rem;
    }
}
