/* ═══════════════════════════════════════════
   DETALLE CURSO - detalle_curso.css
   ═══════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: #f4f4f4; color: #111; }

.curso-banner {
    background: #111;
    color: #fff;
    padding: 28px 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Izquierda */
.banner-izq h1 { margin: 0 0 10px; font-size: 1.8rem; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-pills span {
    background: rgba(255,255,255,0.1);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.rating-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
}
.rating-promedio {
    font-size: 2.4rem;
    font-weight: 900;
    color: #f5a623;
    line-height: 1;
}
.rating-promedio span { font-size: 1rem; color: #aaa; font-weight: 400; }
.estrellas-display { display: flex; gap: 3px; justify-content: center; margin: 4px 0; }
.estrella-display { font-size: 1.2rem; color: #444; transition: color 0.2s; }
.estrella-display.llena  { color: #f5a623; }
.estrella-display.media  { color: #f5a623; opacity: 0.5; }
.rating-total { font-size: 0.78rem; color: #888; }

/* Derecha */
.banner-der {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Selector estrellas */
.rating-selector { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rating-selector p { font-size: 0.78rem; color: #aaa; margin: 0; }
.estrellas-input { display: flex; gap: 3px; flex-direction: row-reverse; }
.estrellas-input input { display: none; }
.estrellas-input label {
    font-size: 1.4rem;
    cursor: pointer;
    color: #444;
    transition: color 0.15s;
}
.estrellas-input label:hover,
.estrellas-input label:hover ~ label,
.estrellas-input input:checked ~ label { color: #f5a623; }

.btn-calificar {
    background: #f5a623; color: #111; border: none;
    padding: 7px 18px; border-radius: 8px; font-weight: 700;
    cursor: pointer; font-size: 0.82rem; font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
}
.btn-calificar:hover { background: #e09010; }

.fade-out { animation: fadeOut 0.5s forwards; }
@keyframes fadeOut {
    to { opacity: 0; height: 0; overflow: hidden; padding: 0; margin: 0; }
}

.ya-califico { font-size: 0.82rem; color: #aaa; margin: 0; }
.ya-califico strong { color: #f5a623; }
.no-sesion-tip { font-size: 0.75rem; color: #666; margin: 0; }

/* Likes / Dislikes */
.reacciones-box { display: flex; gap: 10px; align-items: center; }
.btn-reaccion {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; padding: 8px 16px; border-radius: 8px;
    cursor: pointer; font-size: 0.88rem; font-weight: 600;
    font-family: 'Poppins', sans-serif; transition: all 0.2s;
}
.btn-reaccion:hover { background: rgba(255,255,255,0.15); }
.btn-reaccion.activo-like    { background: #25d366; border-color: #25d366; color: #fff; }
.btn-reaccion.activo-dislike { background: #ff4444; border-color: #ff4444; color: #fff; }
.btn-reaccion .cnt { font-size: 0.82rem; opacity: 0.85; }

/* ═══════════════════════════════════════════
   LAYOUT 3 COLUMNAS
   ═══════════════════════════════════════════ */
.detalle-layout {
    display: grid;
    grid-template-columns: 200px 1fr 260px;
    grid-template-rows: auto auto;
    min-height: calc(100vh - 200px);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════
   SIDEBAR IZQUIERDO - NAVEGACIÓN
   ═══════════════════════════════════════════ */
.sidebar-nav {
    background: #fff;
    border-right: 1px solid #e5e5e5;
    padding: 20px 0;
    position: sticky;
    top: 70px;
    height: fit-content;
    grid-row: 1;
}
.sidebar-nav .nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    padding: 0 20px;
    margin: 18px 0 6px;
}
.sidebar-nav .nav-section-title:first-child { margin-top: 4px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #555;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    user-select: none;
}
.nav-item:hover { background: #f9f9f9; color: #111; }
.nav-item.active {
    background: #fff5f5;
    color: #cc0000;
    font-weight: 600;
    border-left-color: #ff0000;
}
.nav-item .icon { font-size: 1rem; width: 20px; text-align: center; }

/* ═══════════════════════════════════════════
   CONTENIDO CENTRAL
   ═══════════════════════════════════════════ */
.main-content {
    padding: 30px 40px;
    background: #f4f4f4;
    grid-row: 1;
    min-width: 0;
}
.content-panel { display: none; animation: fadeIn 0.25s ease; }
.content-panel.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.content-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}
.content-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #111;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}
.curso-img-full {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-bottom: 20px;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.texto-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.85;
    white-space: pre-line;
}

/* Listas */
.tema-lista { list-style: none; }
.tema-lista li {
    padding: 10px 14px;
    border-radius: 7px;
    background: #f9f9f9;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tema-lista li::before { content: "✔"; color: #ff0000; font-size: 0.8rem; flex-shrink: 0; }

.req-lista { list-style: none; }
.req-lista li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}
.req-lista li::before { content: "→"; color: #ff0000; }

/* Galería */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.galeria-grid img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.galeria-grid img:hover { transform: scale(1.03); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }

/* Historial avance */
.avance-box {
    background: #f9f9f9;
    border-left: 4px solid #ff0000;
    padding: 16px 18px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════
   PANEL DERECHO DE PAGO
   ═══════════════════════════════════════════ */
.pago-panel {
    background: #111;
    color: #fff;
    padding: 28px 24px;
    grid-row: 1;
    position: sticky;
    top: 70px;
    height: fit-content;
    border-left: 1px solid #222;
}
.pago-panel h3 {
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    font-size: 0.75rem;
}
.precio-grande {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ff0000;
    margin-bottom: 20px;
    line-height: 1;
}
.precio-grande span { font-size: 1rem; font-weight: 400; color: #888; }

/* QR */
.qr-container {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    margin-bottom: 16px;
    display: none;
}
.qr-container.visible { display: block; }
.qr-container img { width: 100%; border-radius: 6px; max-width: 180px; }
.qr-container p { font-size: 0.75rem; color: #888; margin-top: 8px; }

/* Botones de pago */
.btn-pago {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    margin-bottom: 10px;
    text-decoration: none;
    transition: filter 0.2s, transform 0.15s;
}
.btn-pago:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn-pago:active { transform: translateY(0); }
.btn-pago.rojo  { background: #ff0000; color: #fff; }
.btn-pago.verde { background: #25d366; color: #fff; }
.btn-pago.gris  { background: #2a2a2a; color: #ccc; border: 1px solid #444; }

/* Métodos colapsables */
.pago-metodo-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #ccc;
    margin-bottom: 8px;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
}
.pago-metodo-btn:hover { background: #222; border-color: #555; }
.pago-metodo-btn.open  { border-color: #ff0000; color: #ff3333; }

.metodo-contenido {
    display: none;
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    text-align: center;
}
.metodo-contenido.visible { display: block; }
.metodo-contenido img { width: 100%; max-width: 180px; border-radius: 6px; }
.metodo-contenido p { font-size: 0.78rem; color: #666; margin-top: 8px; }
.metodo-contenido .cuenta-info {
    font-size: 0.85rem;
    color: #333;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    text-align: left;
    line-height: 1.7;
}

/* Beneficios */
.beneficios { margin-top: 18px; }
.beneficios p { font-size: 0.8rem; color: #888; display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.beneficios p::before { content: "✓"; color: #25d366; font-weight: 700; }

/* Bloqueado */
.locked-box {
    background: #1a1a1a;
    border: 1px dashed #444;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
}
.locked-box p { font-size: 0.82rem; color: #888; margin-bottom: 12px; line-height: 1.5; }
.btn-login-lock {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 7px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-login-lock:hover { background: #2a2a2a; }

/* ═══════════════════════════════════════════
   COMENTARIOS
   ═══════════════════════════════════════════ */
.comentarios-row {
    grid-column: 1 / -1;
    background: #f4f4f4;
    padding: 0 40px 30px 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.comentarios-inner {
    background: #fff;
    width: calc(100% - 200px - 250px);
    margin-left: 200px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.comentarios-row h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.lista-comentarios { width: 100%; }
.comentarios-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 90px;
    box-sizing: border-box;
}
.comentarios-row textarea:focus { outline: none; border-color: #ff0000; }
.btn-comentar {
    margin-top: 10px;
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-comentar:hover { background: #ff0000; }

/* Comentario item */
.comentario-item {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}
.comentario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.comentario-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff0000;
    flex-shrink: 0;
}
.comentario-meta { display: flex; flex-direction: column; gap: 2px; }
.comentario-autor { font-size: 0.95rem; color: #ffffff; }
.comentario-fecha { font-size: 0.78rem; color: #888; }
.comentario-texto {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.6;
    margin: 0;
    padding-left: 56px;
}

/* Botones respuesta */
.btn-responder {
    background: transparent;
    border: 1px solid #333;
    color: #aaa;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}
.btn-responder:hover { border-color: #ff0000; color: #ff0000; }
.btn-cancelar {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-cancelar:hover { border-color: #ff0000; color: #ff0000; }
.btn-sm { font-size: 0.85rem; padding: 6px 16px; }

/* Formulario respuesta */
.form-respuesta {
    margin-top: 10px;
    padding: 12px;
    background: #111;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}
.form-respuesta textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    padding: 8px;
    font-size: 0.85rem;
    resize: vertical;
    box-sizing: border-box;
}
.form-respuesta-btns { display: flex; gap: 8px; margin-top: 8px; }

/* Respuestas anidadas */
.respuestas-lista {
    margin-top: 12px;
    margin-left: 30px;
    border-left: 2px solid #ff000033;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.respuesta-item { background: #141414; border-color: #222; }
.avatar-sm { width: 32px !important; height: 32px !important; }

/* ═══════════════════════════════════════════
   MODAL AUTH
   ═══════════════════════════════════════════ */
.auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.auth-modal {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    position: relative;
}
.auth-modal h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-modal p  { color: #888; font-size: 0.9rem; margin-bottom: 22px; }
.auth-modal input {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.auth-modal input:focus { outline: none; border-color: #ff0000; }
.btn-auth {
    width: 100%;
    background: #ff0000;
    color: #fff;
    padding: 13px;
    border: none;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}
.btn-auth:hover { background: #cc0000; }
.close-modal {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}
.hidden { display: none !important; }
.auth-switch { margin-top: 14px; font-size: 0.85rem; color: #666; text-align: center; }
.auth-switch a { color: #ff0000; text-decoration: none; font-weight: 600; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1100px) {
    .detalle-layout { grid-template-columns: 200px 1fr 250px; }
}
@media (max-width: 850px) {
    .detalle-layout { grid-template-columns: 1fr; }
    .sidebar-nav {
        position: relative; top: 0;
        display: flex; overflow-x: auto;
        padding: 10px 0; border-right: none;
        border-bottom: 1px solid #e5e5e5; gap: 0;
    }
    .sidebar-nav .nav-section-title { display: none; }
    .nav-item {
        flex-direction: column; min-width: 80px;
        text-align: center; font-size: 0.75rem;
        border-left: none; border-bottom: 3px solid transparent;
        padding: 10px 14px; gap: 4px;
    }
    .nav-item.active { border-left: none; border-bottom-color: #ff0000; }
    .nav-item .icon { font-size: 1.2rem; }
    .pago-panel { position: relative; top: 0; grid-row: auto; }
    .comentarios-inner { width: 100%; margin-left: 0; }
}


/* Estilos nuevos para los formularios de pago */
    .form-comprobante { background: #f9f9f9; padding: 15px; border-radius: 10px; margin-top: 15px; border: 1px solid #eee; }
    .form-comprobante input[type="file"] { width: 100%; border: 2px dashed #ccc; padding: 8px; border-radius: 8px; margin-bottom: 10px; background: #fff; cursor: pointer; font-size: 0.8rem; }
    .btn-enviar-pago { width: 100%; background: #111; color: #fff; border: none; padding: 10px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; }
    .btn-enviar-pago:hover { background: #ff0000; }


/* Botones de selección de método */
.btn-metodo {
    width: 100%;
    background: #fff;
    border: 2px solid #e5e5e5;
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    color: #333;
    font-family: 'Poppins', sans-serif;
}
.btn-metodo:hover  { border-color: #ff0000; color: #ff0000; background: #fff5f5; }
.btn-metodo.activo { border-color: #ff0000; background: #fff0f0; color: #ff0000; }

/* Zona de upload */
.zona-upload {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.zona-upload:hover, .zona-upload.drag-over {
    border-color: #ff0000;
    background: #fff5f5;
}
.upload-icon { font-size: 1.8rem; }
.upload-text { font-size: 0.82rem; font-weight: 600; color: #444; }
.upload-hint { font-size: 0.72rem; color: #aaa; }

/* Botón principal ADQUIRIR */
.btn-adquirir {
    width: 100%;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 15px rgba(255,0,0,0.3);
}
.btn-adquirir:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,0,0,0.4);
}
.btn-adquirir:active { transform: translateY(0); }


