/* Estilos de la parte pública de Entrenamientos (clases.php y detalle.php). Reutiliza las
   variables de color/sombra de diplomatura/style.css para quedar dentro de la misma identidad
   visual del resto del sitio. */
/* touch: forzar resubida por sync */

.et-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
    padding: 70px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.et-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.14), transparent 55%);
    pointer-events: none;
}

.et-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
    position: relative;
}

.et-hero.tiene-imagen .et-hero-inner {
    grid-template-columns: 1.2fr 0.8fr;
}

.et-hero-volver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.et-hero-volver:hover {
    color: white;
}

.et-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;
}

.et-hero h1 {
    color: white;
    font-size: 2.4rem;
    line-height: 1.25;
    margin: 0 0 14px;
}

.et-hero-fecha {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffe3f1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.et-hero-descripcion {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 520px;
}

.et-hero-descripcion p:first-child {
    margin-top: 0;
}

.et-hero-descripcion p:last-child {
    margin-bottom: 0;
}

.et-hero-imagen-wrap {
    position: relative;
}

.et-hero-imagen {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-card);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
    border: 4px solid rgba(255, 255, 255, 0.25);
    display: block;
}

@media (max-width: 800px) {
    .et-hero.tiene-imagen .et-hero-inner {
        grid-template-columns: 1fr;
    }

    .et-hero-inner {
        text-align: center;
    }

    .et-hero-fecha {
        justify-content: center;
    }

    .et-hero-descripcion {
        max-width: none;
        margin: 0 auto;
    }

    .et-hero-imagen-wrap {
        max-width: 320px;
        margin: 0 auto;
    }

    .et-hero h1 {
        font-size: 1.9rem;
    }
}

/* --- Grilla de clases --- */
.et-clases-section {
    padding: 70px 20px 90px;
    background: var(--bg-light);
}

.et-section-title {
    text-align: center;
    color: var(--primary-dark);
    font-size: 2rem;
    margin: 0 0 8px;
}

.et-section-sub {
    text-align: center;
    color: var(--text-muted);
    margin: 0 0 46px;
}

.et-clases-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
    justify-content: center;
    gap: 26px;
}

.et-clase-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, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.et-clase-card:hover {
    transform: var(--hover-lift);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.et-clase-imagen-wrap {
    position: relative;
}

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

.et-clase-medallion {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-main), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: 0 8px 18px -6px rgba(74, 44, 94, 0.5);
    flex-shrink: 0;
    margin: 26px 24px 0;
}

.et-clase-medallion-flotante {
    position: absolute;
    left: 20px;
    bottom: -20px;
    margin: 0;
    border: 3px solid white;
}

.et-clase-body {
    padding: 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.et-clase-imagen-wrap+.et-clase-body {
    padding-top: 32px;
}

.et-clase-fecha {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.et-clase-titulo {
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 22px;
    flex-grow: 1;
}

.et-btn-ingresar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 8px;
    padding: 11px 30px;
    background: var(--accent-pink);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 8px 18px -8px rgba(207, 128, 169, 0.7);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.et-btn-ingresar i {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

.et-btn-ingresar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(74, 44, 94, 0.55);
}

.et-btn-ingresar:hover i {
    transform: translateX(3px);
}

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

/* --- Header de detalle.php --- */
.et-detalle-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
    padding: 46px 20px 90px;
    text-align: center;
    color: white;
    position: relative;
}

.et-detalle-meta {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.82rem;
    margin-bottom: 12px;
    display: block;
}

.et-detalle-meta a {
    color: white;
    text-decoration: none;
}

.et-detalle-meta a:hover {
    text-decoration: underline;
}

.et-detalle-titulo {
    font-size: 2.2rem;
    color: white;
    margin: 0;
    line-height: 1.25;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Certificado --- */
.et-cert-section {
    padding: 0 20px 80px;
    background: var(--bg-light);
}

.et-cert-card {
    max-width: 560px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
    padding: 40px 30px;
    text-align: center;
}

.et-cert-icon {
    font-size: 2.4rem;
    color: var(--accent-pink);
    margin-bottom: 14px;
    display: block;
}

.et-cert-card h3 {
    color: var(--primary-dark);
    margin: 0 0 10px;
    font-size: 1.4rem;
}

.et-cert-card p {
    color: var(--text-muted);
    margin: 0 0 24px;
    line-height: 1.6;
}

.et-cert-card .et-btn-ingresar {
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

/* Popup de solicitud de certificado */
.et-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(74, 44, 94, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.et-modal-overlay.open {
    display: flex;
}

.et-modal-box {
    background: white;
    border-radius: var(--radius-card);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
}

.et-modal-box h3 {
    color: var(--primary-dark);
    margin-top: 0;
}

.et-modal-sub {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.et-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
}

.et-modal-close:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.et-form-group {
    margin-bottom: 18px;
    text-align: left;
}

.et-form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.92rem;
}

.et-form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.et-btn-submit {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--accent-pink);
    color: white;
    border: none;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.et-btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
