/* =========================================
   VARIABLES DE COLOR
========================================= */

:root {
    --bg: #f5f7f8;
    --card: #ffffff;
    --text: #464137;
    --muted: #777675;
    --accent: #e4bf3b;
    --danger: #a52727;
    --ok: #197247;
    --border: #c0bbb2;
}


/* =========================================
   AJUSTES GENERALES
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}


/* =========================================
   BARRA SUPERIOR
========================================= */

.topbar {
    background: #887f6e;
    border-bottom: 1px solid var(--border);
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.topbar nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.brand {
    font-size: 22px;
    font-weight: 700;
}


/* =========================================
   CONTENEDOR PRINCIPAL
========================================= */

.container {
    width: min(1180px, 92%);
    margin: 30px auto;
}


/* =========================================
   TARJETAS
========================================= */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
}


/* =========================================
   GRID GENERAL
========================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(240px, 1fr)
    );
    gap: 16px;
}


/* =========================================
   BOTONES
========================================= */

.btn,
button {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    background: var(--accent);
    color: #464137;
    cursor: pointer;
    font-size: 14px;
}

.btn.secondary {
    background: #65727a;
}

.btn.danger {
    background: var(--danger);
}


/* =========================================
   FORMULARIOS
========================================= */

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bcc8ce;
    border-radius: 7px;
    font: inherit;
}

label {
    display: block;
    font-weight: 700;
    margin: 12px 0 6px;
}


/* =========================================
   TABLAS
========================================= */

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}


/* =========================================
   ACCIONES
========================================= */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* =========================================
   ALERTAS
========================================= */

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #e8eef2;
}

.alert.success {
    background: #ddf3e8;
    color: #155d3b;
}

.alert.error {
    background: #f8dddd;
    color: #7e1919;
}


/* =========================================
   BARRA DE PROGRESO
========================================= */

.progress {
    height: 12px;
    background: #e7ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    background: var(--accent);
}


/* =========================================
   PÁGINA DEL CURSO
========================================= */

.course-player {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 320px;
    gap: 20px;
}


/* =========================================
   REPRODUCTOR DE VIDEO
========================================= */

.video-wrap video {
    width: 100%;
    background: #000000;
    border-radius: 10px;
}


/* =========================================
   LISTA DE LECCIONES
========================================= */

.lesson-list a {
    display: block;
    padding: 11px;
    border-bottom: 1px solid var(--border);
}

.lesson-list a.active {
    font-weight: 700;
    background: #eef5f8;
}


/* =========================================
   TEXTOS PEQUEÑOS
========================================= */

.small {
    font-size: 13px;
    color: var(--muted);
}


/* =========================================
   LOGIN
========================================= */

.login-card {
    max-width: 440px;
    margin: 70px auto;
}


/* =========================================
   BADGES / ETIQUETAS
========================================= */

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    background: #e8eef2;
    font-size: 12px;
}

.badge.ok {
    background: #dcefe5;
    color: #155d3b;
}


/* =========================================
   FORMULARIOS EN LÍNEA
========================================= */

.inline-form {
    display: inline;
}


/* =========================================
   MENÚ DE ADMINISTRACIÓN
========================================= */

.admin-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}


/* =========================================
   CUESTIONARIOS
========================================= */

.quiz-card {
    margin-top: 24px;
}

.quiz-question {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin: 18px 0;
}

.quiz-question legend {
    padding: 0 8px;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.quiz-option input {
    width: auto;
    margin-top: 2px;
}


/* =========================================
   OPCIONES EN ADMINISTRACIÓN
========================================= */

.option-admin {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkline input {
    width: auto;
}


/* =========================================
   VERSIÓN MÓVIL
========================================= */

@media (max-width: 800px) {

    .course-player {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar nav {
        flex-wrap: wrap;
    }
}

/* =========================================
   LOGO PRINCIPAL
========================================= */

.logo-principal {
    display: block;
    width: 180px;
    height: auto;
}

.brand {
    display: flex;
    align-items: center;
}

/* =========================================
   FOOTER
========================================= */

.footer-principal {
    background: #f4c928;
    margin-top: 50px;
    padding: 35px 5% 20px;
    color: #18334f;
}

.footer-contenido {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.footer-logo img {
    width: 280px;
    max-width: 100%;
    height: auto;
    display: block;
}

.footer-contacto {
    font-size: 14px;
    line-height: 1.5;
}

.footer-contacto p {
    margin: 4px 0;
}

.footer-contacto a {
    color: #18334f;
    font-weight: 700;
}

.footer-redes {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.footer-redes a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #18334f;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.footer-copy {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
}


/* =========================================
   FOOTER MÓVIL
========================================= */

@media (max-width: 800px) {

    .footer-contenido {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .footer-redes {
        justify-content: center;
    }

    .footer-logo img {
        width: 220px;
    }
}