
/* =========================================================
   V60 - PARIDAD VISUAL ADMIN / INSTRUCTOR
   Las páginas de creación temporal usan exactamente la
   geometría, tarjetas, formularios y responsive del Admin.
   Solo cambia el acento azul por verde Instructor.
========================================================= */

body.instructor-site{
    --inst-primary:#168f82;
    --inst-primary-hover:#11786e;
    --inst-primary-soft:#e8f5f2;
    --inst-primary-border:#b9ddd7;
    --inst-title:#264f5b;
}

/* Evita que instructor.css cambie anchos/espaciados de páginas Admin-like */
body.instructor-site .encabezado-cursos,
body.instructor-site .courses-admin-summary,
body.instructor-site .admin-courses-carousel-section,
body.instructor-site .modulos-page,
body.instructor-site .lessons-container,
body.instructor-site .admin-page.instructor-admin-look,
body.instructor-site .instructor-proposal-admin-look{
    font-size:inherit!important;
    transform:none!important;
    zoom:1!important;
}

/* CURSOS: misma estructura Admin */
body.instructor-site .instructor-course-header{
    width:100%!important;
    max-width:none!important;
    margin:0 0 24px!important;
}

body.instructor-site .instructor-course-header h1{
    font-size:clamp(1.55rem,2.4vw,2.15rem)!important;
    font-weight:800!important;
    color:var(--inst-title)!important;
}

body.instructor-site .instructor-course-header .btn-crear-curso{
    background:linear-gradient(135deg,var(--inst-primary),#35b4a2)!important;
    color:#fff!important;
    border:0!important;
}

body.instructor-site .instructor-course-summary{
    width:100%!important;
    max-width:none!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:16px!important;
}

body.instructor-site .instructor-course-summary article{
    min-height:118px!important;
    border:1px solid #dce7eb!important;
    background:#fff!important;
    border-radius:18px!important;
    padding:20px!important;
    box-shadow:0 12px 32px rgba(31,69,83,.065)!important;
}

body.instructor-site .instructor-course-summary article>span{
    background:var(--inst-primary-soft)!important;
    color:var(--inst-primary)!important;
}

/* Cards de curso: copiar visual del admin, sin CSS experimental del builder */
body.instructor-site .instructor-proposal-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(330px,1fr))!important;
    gap:22px!important;
    align-items:stretch!important;
}

body.instructor-site .instructor-proposal-card.curso-card{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    margin:0!important;
    opacity:1!important;
    transform:none!important;
    position:relative!important;
    border-radius:22px!important;
    overflow:hidden!important;
    background:#fff!important;
    border:1px solid #d8e4e8!important;
    box-shadow:0 14px 36px rgba(36,74,88,.09)!important;
}

body.instructor-site .instructor-proposal-card .curso-imagen{
    position:relative!important;
    width:100%!important;
    height:220px!important;
    min-height:220px!important;
    overflow:hidden!important;
    border-radius:0!important;
}

body.instructor-site .instructor-proposal-card .curso-imagen img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
}

body.instructor-site .instructor-proposal-card .sin-imagen{
    width:100%!important;
    height:100%!important;
    display:grid!important;
    place-items:center!important;
    background:#eef5f6!important;
}

body.instructor-site .instructor-proposal-card .curso-info{
    display:flex!important;
    flex-direction:column!important;
    flex:1 1 auto!important;
    padding:22px!important;
}

body.instructor-site .instructor-proposal-card .curso-info h3{
    font-size:1.3rem!important;
    line-height:1.25!important;
    margin:5px 0 10px!important;
    color:#244f5b!important;
}

body.instructor-site .instructor-proposal-card .curso-info>p{
    min-height:48px!important;
    color:#6b818a!important;
    line-height:1.55!important;
}

body.instructor-site .instructor-proposal-card .datos-curso{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:9px!important;
    margin:14px 0!important;
}

body.instructor-site .instructor-proposal-card .acciones-curso{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    margin-top:auto!important;
    align-items:stretch!important;
}

body.instructor-site .instructor-proposal-card .acciones-curso>a,
body.instructor-site .instructor-proposal-card .acciones-curso form,
body.instructor-site .instructor-proposal-card .acciones-curso form>button{
    width:100%!important;
    min-width:0!important;
}

body.instructor-site .instructor-proposal-card .acciones-curso>a,
body.instructor-site .instructor-proposal-card .acciones-curso form>button{
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    border-radius:12px!important;
    padding:9px 11px!important;
    font-size:.87rem!important;
    font-weight:800!important;
    text-align:center!important;
    white-space:normal!important;
}

/* Mantener semántica de colores del Admin */
body.instructor-site .instructor-proposal-card .btn-modulos{
    background:#e7f5ee!important;
    color:#23724f!important;
}
body.instructor-site .instructor-proposal-card .btn-examen{
    background:#f0eaff!important;
    color:#6845a9!important;
}
body.instructor-site .instructor-proposal-card .btn-certificado{
    background:#fff3cf!important;
    color:#8a6900!important;
}

/* MÓDULOS: misma geometría Admin */
body.instructor-site .modulos-page{
    width:100%!important;
    max-width:none!important;
}

body.instructor-site .cards-modulos{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(310px,1fr))!important;
    gap:20px!important;
    width:100%!important;
}

body.instructor-site .modulo-card{
    width:100%!important;
    max-width:none!important;
    min-height:260px!important;
    margin:0!important;
    transform:none!important;
    position:relative!important;
    border-radius:20px!important;
    background:#fff!important;
    border:1px solid #d8e5e7!important;
    box-shadow:0 12px 30px rgba(35,73,84,.075)!important;
}

body.instructor-site .modulo-franja{
    background:linear-gradient(90deg,var(--inst-primary),#43b8ab)!important;
}

body.instructor-site .modulo-numero span{
    background:var(--inst-primary-soft)!important;
    color:var(--inst-primary)!important;
}

body.instructor-site .acciones-modulo{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
}

body.instructor-site .acciones-modulo>a,
body.instructor-site .acciones-modulo form,
body.instructor-site .acciones-modulo form>button{
    width:100%!important;
}

body.instructor-site .acciones-modulo>a,
body.instructor-site .acciones-modulo form>button{
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
}

/* LECCIONES: misma geometría Admin */
body.instructor-site .lessons-container{
    width:100%!important;
    max-width:none!important;
}

body.instructor-site .cards-lecciones{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr))!important;
    gap:20px!important;
}

body.instructor-site .leccion-card{
    width:100%!important;
    max-width:none!important;
    min-height:250px!important;
    margin:0!important;
    transform:none!important;
    border-radius:20px!important;
    background:#fff!important;
    border:1px solid #d8e5e7!important;
    box-shadow:0 12px 30px rgba(35,73,84,.075)!important;
}

body.instructor-site .leccion-card-image{
    height:190px!important;
}

body.instructor-site .leccion-card-image img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
}

body.instructor-site .acciones-leccion{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
}

body.instructor-site .acciones-leccion>a,
body.instructor-site .acciones-leccion form,
body.instructor-site .acciones-leccion form>button{
    width:100%!important;
}

body.instructor-site .acciones-leccion>a,
body.instructor-site .acciones-leccion form>button{
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
}

/* FORMULARIOS: usar exactamente layout Admin */
body.instructor-site .admin-page.instructor-admin-look{
    width:100%!important;
    max-width:none!important;
}

body.instructor-site .instructor-admin-head{
    width:100%!important;
    margin-bottom:22px!important;
}

body.instructor-site .admin-form-card{
    width:100%!important;
    max-width:1120px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

body.instructor-site .course-create-form{
    width:100%!important;
}

body.instructor-site .course-create-form .form-row{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
}

body.instructor-site .course-create-form .form-group{
    min-width:0!important;
}

body.instructor-site .course-create-form input,
body.instructor-site .course-create-form select,
body.instructor-site .course-create-form textarea{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
}

/* CABECERA de section-header del Admin, pero verde */
body.instructor-site .admin-section-header,
body.instructor-site .section-header-shell,
body.instructor-site .section-header{
    --admin-section-accent:var(--inst-primary)!important;
    --admin-section-soft:var(--inst-primary-soft)!important;
}

body.instructor-site .admin-form-premium-kicker,
body.instructor-site .admin-courses-carousel-kicker{
    color:var(--inst-primary)!important;
}

/* Exámenes y certificado */
body.instructor-site .proposal-exam-page,
body.instructor-site .admin-form-card{
    border-radius:20px!important;
}

body.instructor-site .proposal-question-list article{
    border-radius:14px!important;
}

/* Responsive igual Admin */
@media(max-width:900px){
    body.instructor-site .instructor-course-summary{
        grid-template-columns:1fr 1fr!important;
    }

    body.instructor-site .course-create-form .form-row{
        grid-template-columns:1fr!important;
    }
}

@media(max-width:700px){
    body.instructor-site .instructor-proposal-grid,
    body.instructor-site .cards-modulos,
    body.instructor-site .cards-lecciones{
        grid-template-columns:1fr!important;
    }

    body.instructor-site .instructor-proposal-card .acciones-curso,
    body.instructor-site .acciones-modulo,
    body.instructor-site .acciones-leccion{
        grid-template-columns:1fr!important;
    }

    body.instructor-site .instructor-course-summary{
        grid-template-columns:1fr!important;
    }

    body.instructor-site .instructor-proposal-card .curso-imagen{
        height:190px!important;
        min-height:190px!important;
    }
}


/* =========================================================
   V62 - CARDS COMPACTAS / PREVIEW / VERDADERO-FALSO
========================================================= */

/* Cursos: no ocupar toda la pantalla por una sola card */
body.instructor-site .instructor-proposal-grid{
    grid-template-columns:repeat(auto-fill,minmax(300px,380px))!important;
    justify-content:start!important;
    align-items:start!important;
}

body.instructor-site .instructor-proposal-card.curso-card{
    max-width:380px!important;
    min-height:0!important;
    height:auto!important;
}

body.instructor-site .instructor-proposal-card .curso-imagen{
    height:155px!important;
    min-height:155px!important;
}

body.instructor-site .instructor-proposal-card .curso-info{
    padding:16px!important;
}

body.instructor-site .instructor-proposal-card .curso-info h3{
    font-size:1.08rem!important;
    margin:3px 0 7px!important;
}

body.instructor-site .instructor-proposal-card .curso-info>p{
    min-height:0!important;
    max-height:42px!important;
    overflow:hidden!important;
    margin:0 0 7px!important;
    font-size:.85rem!important;
}

body.instructor-site .instructor-proposal-card .datos-curso{
    margin:9px 0!important;
    gap:6px!important;
    font-size:.78rem!important;
}

body.instructor-site .instructor-proposal-card .acciones-curso>a,
body.instructor-site .instructor-proposal-card .acciones-curso form>button{
    min-height:38px!important;
    font-size:.79rem!important;
    padding:7px 8px!important;
}

/* Módulos compactos */
body.instructor-site .cards-modulos{
    grid-template-columns:repeat(auto-fill,minmax(290px,390px))!important;
    justify-content:start!important;
}

body.instructor-site .modulo-card{
    max-width:390px!important;
    min-height:0!important;
    padding-bottom:14px!important;
}

body.instructor-site .modulo-info{
    padding:14px!important;
}

body.instructor-site .modulo-info h3{
    font-size:1.05rem!important;
}

body.instructor-site .acciones-modulo>a,
body.instructor-site .acciones-modulo form>button{
    min-height:38px!important;
    font-size:.79rem!important;
}

/* Lecciones compactas */
body.instructor-site .cards-lecciones{
    grid-template-columns:repeat(auto-fill,minmax(290px,390px))!important;
    justify-content:start!important;
}

body.instructor-site .leccion-card{
    max-width:390px!important;
    min-height:0!important;
}

body.instructor-site .leccion-card-image{
    height:145px!important;
}

body.instructor-site .leccion-info{
    padding:14px!important;
}

body.instructor-site .acciones-leccion{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

body.instructor-site .acciones-leccion>a,
body.instructor-site .acciones-leccion form>button{
    min-height:38px!important;
    font-size:.76rem!important;
}

body.instructor-site .acciones-leccion .preview{
    background:#e8f3fb!important;
    color:#2e78a7!important;
}

/* Preview */
.lesson-preview-card{
    padding:0!important;
    overflow:hidden!important;
}

.lesson-preview-cover{
    width:100%;
    max-height:340px;
    overflow:hidden;
    background:#eef5f4;
}

.lesson-preview-cover img{
    width:100%;
    height:100%;
    max-height:340px;
    object-fit:cover;
    display:block;
}

.lesson-preview-content{
    padding:24px;
}

.lesson-preview-kicker{
    font-size:.72rem;
    letter-spacing:.12em;
    font-weight:900;
    color:#168f82;
}

.lesson-preview-content h2{
    color:#28585e;
    margin:7px 0 10px;
}

.lesson-preview-description{
    color:#71868b;
    line-height:1.6;
}

.lesson-preview-video{
    margin:15px 0;
}

.lesson-preview-video a,
.lesson-preview-material{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border-radius:11px;
    padding:10px 14px;
    font-weight:850;
    text-decoration:none;
}

.lesson-preview-video a{
    background:#e9f3fb;
    color:#2d76a6;
}

.lesson-preview-material{
    background:#e8f5f2;
    color:#16766d;
    margin-top:18px;
}

.lesson-preview-body{
    margin-top:18px;
    padding:18px;
    background:#f8fbfb;
    border:1px solid #dce9e7;
    border-radius:14px;
    color:#375a5f;
    line-height:1.7;
}

/* Verdadero/Falso */
.proposal-vf-help{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    padding:12px;
    background:#f4f9f8;
    border:1px solid #d8e8e5;
    border-radius:11px;
}

.proposal-vf-help[hidden]{
    display:none!important;
}

.proposal-vf-help span{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-weight:800;
    color:#49696b;
}

/* Cert editor proposal usa ancho completo como editor oficial */
body.instructor-site .certificate-editor-page,
body.instructor-site .certificate-editor-layout{
    max-width:none!important;
}

@media(max-width:700px){
    body.instructor-site .instructor-proposal-grid,
    body.instructor-site .cards-modulos,
    body.instructor-site .cards-lecciones{
        grid-template-columns:1fr!important;
    }

    body.instructor-site .instructor-proposal-card.curso-card,
    body.instructor-site .modulo-card,
    body.instructor-site .leccion-card{
        max-width:none!important;
    }

    body.instructor-site .acciones-leccion{
        grid-template-columns:1fr!important;
    }
}
