/* Estilos de la parte pública de Cursos (catálogo, ficha y contenido). Mismas variables de
   diplomatura/style.css que usa el resto del sitio.

   OJO: .pc-hero/.pc-hero-inner/.pc-catalogo/.pc-card (y sus variantes)/.pc-vacio son EXCLUSIVOS del catálogo
   (index.php) — se rediseñaron en línea con la home/diplomatura (fondo claro, Playfair Display).
   .pc-hero-badge en cambio también lo usa la ficha de detalle (.pc-hero2, que sigue con el
   degradé oscuro), así que se deja intacto a propósito y el catálogo usa .pc-eyebrow en su
   lugar. Todo lo de .pc-hero2 en adelante (ficha, contenido, checkout) NO se tocó. */

.pc-hero {
    position: relative;
    background: #F6F3F8;
    padding: 90px 20px 70px;
    color: var(--primary-dark);
    text-align: center;
    overflow: hidden;
}

.pc-hero .sparkle {
    position: absolute;
    opacity: 0.7;
}

.pc-hero-inner {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.pc-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-pink);
    margin-bottom: 18px;
}

.pc-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.pc-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 2.6rem;
    margin: 0 0 14px;
}

.pc-hero p {
    color: #7d6b86;
    font-size: 1.05rem;
    margin: 0;
}

/* --- Catálogo --- */
.pc-catalogo {
    position: relative;
    padding: 60px 20px 110px;
    background: linear-gradient(180deg, #F6F3F8 0%, #ffffff 60%);
    overflow: hidden;
}

.pc-catalogo .sparkle {
    position: absolute;
    opacity: 0.6;
}

/* Resplandor suave detrás de la grilla: le da atmósfera/efecto a la sección
   en vez de dejarla plana, sobre todo cuando hay pocas tarjetas. */
.pc-catalogo::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    max-width: 160vw;
    background: radial-gradient(circle, rgba(207, 128, 169, 0.14) 0%, rgba(207, 128, 169, 0) 68%);
    pointer-events: none;
}

/* auto-fit (no auto-fill): con pocas tarjetas, los "carriles" vacíos de la
   grilla colapsan y justify-content las centra de verdad, en vez de
   quedarse pegadas a la izquierda con hueco invisible reservado al lado. */
.pc-catalogo-grid {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    justify-content: center;
    gap: 30px;
}

.pc-card {
    background: white;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.pc-card:hover {
    transform: var(--hover-lift);
    box-shadow: var(--shadow-hover);
}

.pc-card-imagen {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.pc-card-imagen-vacia {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6dce9;
    color: var(--accent-pink);
    font-size: 2.4rem;
}

.pc-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pc-card-titulo {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px;
    flex-grow: 1;
}

.pc-card-precio {
    color: var(--accent-pink);
    font-weight: 700;
    margin-bottom: 16px;
}

.pc-btn-ver,
.pc-btn-comprar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent-pink);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.pc-btn-ver {
    width: 100%;
}

.pc-btn-ver:hover,
.pc-btn-comprar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Cuando hay más de un método de pago disponible (Mercado Pago + PayPal), los botones se apilan
   con un poco de aire entre ellos; el segundo se muestra en outline para no competir con el
   primero. */
.pc-hero2-cta,
.pc-footer-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pc-btn-comprar-outline {
    background: transparent;
    border: 2px solid var(--accent-pink);
    color: var(--accent-pink);
}

.pc-btn-comprar-outline:hover {
    background: var(--accent-pink);
    color: white;
}

.pc-btn-ancho-completo {
    width: 100%;
}

.pc-precio-card .pc-btn-comprar,
.pc-precio-card .pc-btn-comprar-outline {
    display: flex;
}

.pc-vacio {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: var(--radius-card);
    color: var(--text-muted);
    border: 1px dashed var(--primary-light);
}

/* --- Ficha de detalle: hero con video/imagen centrado --- */
.pc-hero2 {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
    padding: 50px 20px 60px;
    color: white;
    text-align: center;
}

.pc-hero2-inner {
    max-width: 900px;
    margin: 0 auto;
}

.pc-volver {
    display: inline-block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.pc-volver:hover {
    color: white;
}

.pc-hero2-inner h1 {
    color: white;
    font-size: 2.3rem;
    margin: 0 0 12px;
    line-height: 1.25;
}

.pc-hero2-precio {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffe3f1;
    margin-bottom: 28px;
}

.pc-hero2-media {
    max-width: 800px;
    margin: 0 auto 30px;
    border-radius: var(--radius-card);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.pc-hero2-media-video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.pc-hero2-media-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.pc-hero2-media-imagen img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* --- Cuerpo: descripción + índice de contenido + tarjeta de precio --- */
.pc-detalle-info {
    background: var(--bg-light);
    padding: 60px 20px 90px;
}

.pc-detalle-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: start;
}

.pc-detalle-h2 {
    color: var(--primary-dark);
    font-size: 1.4rem;
    margin: 0 0 18px;
}

.pc-detalle-main .pc-detalle-h2:not(:first-child) {
    margin-top: 40px;
}

.pc-detalle-descripcion {
    background: white;
    border-radius: var(--radius-card);
    padding: 26px 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.pc-curriculum {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-curriculum-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    border: 1px solid #f0f0f0;
}

.pc-curriculum-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--primary-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.pc-curriculum-titulo {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 4px;
}

.pc-curriculum-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pc-sidebar {
    position: sticky;
    top: 20px;
}

.pc-precio-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 30px 26px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
    text-align: center;
}

.pc-precio-card-monto {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 18px;
}

.pc-beneficios {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    text-align: left;
}

.pc-beneficios li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.pc-beneficios i {
    color: #2e7d32;
    margin-top: 2px;
}

@media (max-width: 800px) {
    .pc-detalle-grid {
        grid-template-columns: 1fr;
    }

    .pc-sidebar {
        position: static;
    }

    .pc-hero2-inner h1 {
        font-size: 1.8rem;
    }
}

/* --- CTA final --- */
.pc-footer-cta {
    background: white;
    padding: 70px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.pc-footer-cta h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    margin: 0 0 10px;
}

.pc-footer-cta p {
    color: var(--text-muted);
    margin: 0 0 26px;
}

/* --- Contenido (gateado) --- */
.pc-contenido-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
    padding: 40px 20px;
    color: white;
}

.pc-contenido-header h1 {
    color: white;
    margin: 8px 0 0;
    font-size: 1.8rem;
}

.pc-contenido-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 90px;
}

.pc-vacio-texto {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

.pc-tema,
.pc-unidad,
.pc-clase {
    background: white;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
    margin-bottom: 14px;
    overflow: hidden;
}

.pc-tema {
    box-shadow: var(--shadow-soft);
}

.pc-tema-titulo,
.pc-unidad-titulo,
.pc-clase-titulo {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 700;
    color: var(--primary-dark);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-tema-titulo::-webkit-details-marker,
.pc-unidad-titulo::-webkit-details-marker,
.pc-clase-titulo::-webkit-details-marker {
    display: none;
}

.pc-tema-titulo {
    font-size: 1.15rem;
}

.pc-tema-body {
    padding: 0 18px 18px;
}

.pc-unidad {
    background: var(--bg-light);
}

.pc-unidad-titulo {
    font-size: 1.02rem;
}

.pc-unidad-body {
    padding: 0 20px 20px;
}

.pc-clase {
    background: white;
}

.pc-clase-titulo {
    font-size: 0.95rem;
    padding: 14px 18px;
}

.pc-clase-body {
    padding: 0 18px 18px;
}

.pc-rich-text {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 16px;
}

.pc-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.pc-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.pc-archivos-list {
    margin-bottom: 16px;
}

.pc-archivo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 8px;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.pc-archivo-item:hover {
    background: var(--primary-light);
}
