/* ===========================
   CONFIGURACIÓN GENERAL
=========================== */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{

    font-family: "Poppins", sans-serif;
    background-color: #FFFFFF;
}

/* ===========================
   HEADER
=========================== */

.header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 8%;

}

/* Logo */

.logo h1{
    color: #1E3A5F;
    font-size: 2rem;
    font-weight: 700;
}

/* Menú */

.navbar ul{

    display:flex;
    list-style:none;
    gap:40px;

}

.navbar a{

    text-decoration:none;
    color:#1E3A5F;
    font-weight:500;
    transition:0.3s;

}

.navbar a:hover{

    color:#4F9DDE;

}

/* Botón */

.btn-login{

    text-decoration:none;
    background:#1E3A5F;
    color:white;

    padding:12px 25px;

    border-radius:10px;

    transition:.3s;

}

.btn-login:hover{

    background:#4F9DDE;

}

/* ===========================
   HERO
=========================== */

.hero{

    display:flex;

    justify-content:space-between;

    align-items:center;

    min-height:85vh;

    padding:0 8%;

}

.hero-content{

    max-width:600px;

}

.hero-content h2{

    font-size:3.2rem;

    color:#1E3A5F;

    margin-bottom:20px;

}

.hero-content p{

    font-size:1.1rem;

    line-height:1.8;

    color:#555;

    margin-bottom:35px;

}

.btn-primary{

    display:inline-block;

    background:#4F9DDE;

    color:white;

    text-decoration:none;

    padding:15px 35px;

    border-radius:12px;

    font-weight:600;

    transition:.3s;

}

.btn-primary:hover{

    background:#1E3A5F;

}

.hero-image{

    font-size:7rem;

}

/* ===========================
   TEMARIO
=========================== */

.topics{

    padding:100px 8%;

    text-align:center;

}

.topics h2{

    font-size:2.7rem;

    color:#1E3A5F;

    margin-bottom:20px;

}

.topics-description{

    max-width:700px;

    margin:auto;

    color:#666;

    line-height:1.8;

    margin-bottom:60px;

}

.cards{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));

    gap:30px;

}

.card{

    background:white;

    padding:35px;

    border-radius:18px;

    box-shadow:0 10px 25px rgba(0,0,0,.08);

    transition:.3s;

}

.card:hover{

    transform:translateY(-10px);

}

.card span{

    font-size:3rem;

}

.card h3{

    margin:20px 0;

    color:#1E3A5F;

}

.card p{

    color:#666;

    line-height:1.7;

}

/* ===========================
   AUTENTICACIÓN
   Registro e inicio de sesión
=========================== */

.auth-page {
    min-height: 100vh;
    background-color: #f5f7fa;
}

.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Panel izquierdo */

.auth-info {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 45px 10%;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            rgba(30, 58, 95, 0.98),
            rgba(79, 157, 222, 0.92)
        );
}

.auth-info::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -70px;
    border: 45px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.45rem;
    font-weight: 700;
}

.logo-symbol {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.auth-message {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: auto 0;
}

.auth-label {
    margin-bottom: 18px;
    color: #dcefff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.auth-message h1 {
    margin-bottom: 24px;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.18;
}

.auth-message > p:last-child {
    max-width: 500px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

/* Panel derecho */

.auth-form-section {
    display: grid;
    place-items: center;
    padding: 50px 8%;
}

.auth-card {
    width: 100%;
    max-width: 560px;
    padding: 42px;
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(30, 58, 95, 0.12);
}

.auth-card-header {
    margin-bottom: 32px;
}

.auth-card-header h2 {
    margin-bottom: 8px;
    color: #1e3a5f;
    font-size: 2rem;
}

.auth-card-header p {
    color: #687385;
}

/* Formulario */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    margin-bottom: 8px;
    color: #1e3a5f;
    font-size: 0.92rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    color: #26374a;
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    background-color: #f8fafc;
    border: 1px solid #dce3eb;
    border-radius: 11px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus {
    background-color: #ffffff;
    border-color: #4f9dde;
    box-shadow: 0 0 0 4px rgba(79, 157, 222, 0.14);
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 24px;
    color: #687385;
    font-size: 0.85rem;
    line-height: 1.5;
    cursor: pointer;
}

.terms-check input {
    margin-top: 4px;
    accent-color: #1e3a5f;
}

.btn-auth {
    width: 100%;
    padding: 15px 20px;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    background-color: #1e3a5f;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.25s, background-color 0.25s;
}

.btn-auth:hover {
    background-color: #4f9dde;
    transform: translateY(-2px);
}

.auth-switch {
    margin-top: 25px;
    color: #687385;
    text-align: center;
    font-size: 0.92rem;
}

.auth-switch a {
    color: #1e3a5f;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    color: #4f9dde;
}

.form-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 0.88rem;
    text-align: center;
}

/* Diseño adaptable */

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-info {
        min-height: 330px;
        padding: 35px 8%;
    }

    .auth-message {
        margin: 55px 0 10px;
    }
}

@media (max-width: 600px) {
    .auth-form-section {
        padding: 28px 18px;
    }

    .auth-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-message h1 {
        font-size: 2rem;
    }
}

/* ===========================
   AJUSTES EXCLUSIVOS DEL LOGIN
=========================== */

.login-page .auth-form-section {
    align-content: center;
    padding-top: 25px;
    padding-bottom: 25px;
}

.login-page .auth-card {
    max-width: 500px;
    padding: 38px;
}

.login-page .btn-auth {
    max-width: 100%;
}

.login-highlight {
    margin-top: 22px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

/* ===========================
   DASHBOARD DEL ESTUDIANTE
=========================== */

.dashboard-page {
    min-height: 100vh;
    color: #26374a;
    background-color: #f5f7fa;
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 7%;
    background-color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e3e8ef;
    backdrop-filter: blur(12px);
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #1e3a5f;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-logo .logo-symbol {
    border-color: #4f9dde;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.dashboard-nav a {
    color: #526174;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
}

.dashboard-nav a:hover {
    color: #1e3a5f;
}

.btn-logout {
    padding: 11px 18px;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    background-color: #1e3a5f;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: #4f9dde;
}

.dashboard-main {
    width: min(1180px, 88%);
    margin: 0 auto;
    padding: 55px 0 80px;
}

.dashboard-welcome {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 45px;
    align-items: center;
    padding: 45px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #1e3a5f,
            #357fba
        );
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(30, 58, 95, 0.18);
}

.dashboard-label {
    margin-bottom: 12px;
    color: #4f9dde;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.dashboard-welcome .dashboard-label {
    color: #cfeaff;
}

.dashboard-welcome h1 {
    max-width: 680px;
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.18;
}

.dashboard-user {
    color: rgba(255, 255, 255, 0.82);
}

.progress-summary {
    padding: 26px;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
}

.progress-number {
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.progress-number span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 11px;
    margin-bottom: 16px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background-color: #f4b942;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.progress-summary p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.84rem;
    line-height: 1.6;
}

.dashboard-courses {
    padding-top: 65px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.section-heading h2 {
    color: #1e3a5f;
    font-size: 2rem;
}

.section-heading > p {
    max-width: 370px;
    color: #687385;
    text-align: right;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.course-card {
    display: flex;
    flex-direction: column;
    min-height: 390px;
    padding: 26px;
    background-color: #ffffff;
    border: 1px solid #e2e8ef;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(30, 58, 95, 0.08);
}

.course-card.available {
    border-top: 5px solid #4f9dde;
}

.course-card.locked {
    opacity: 0.72;
}

.course-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-number {
    color: #9ba7b5;
    font-size: 0.8rem;
    font-weight: 700;
}

.course-status {
    padding: 6px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999px;
}

.status-open {
    color: #236c47;
    background-color: #dcf4e7;
}

.status-locked {
    color: #687385;
    background-color: #edf0f4;
}

.course-icon {
    margin: 24px 0 18px;
    font-size: 2.8rem;
}

.course-card h3 {
    margin-bottom: 12px;
    color: #1e3a5f;
    font-size: 1.25rem;
}

.course-card > p {
    margin-bottom: 22px;
    color: #687385;
    font-size: 0.88rem;
    line-height: 1.65;
}

.course-meta {
    display: flex;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 20px;
    color: #687385;
    font-size: 0.78rem;
}

.course-meta span {
    padding: 6px 9px;
    background-color: #f4f6f8;
    border-radius: 7px;
}

.course-button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background-color: #1e3a5f;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.course-button:hover {
    background-color: #4f9dde;
}

.locked-button {
    color: #7b8795;
    background-color: #e8ecf1;
    cursor: not-allowed;
}

.locked-button:hover {
    background-color: #e8ecf1;
}

/* Responsive */

@media (max-width: 950px) {
    .dashboard-welcome {
        grid-template-columns: 1fr;
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .dashboard-header {
        align-items: flex-start;
        gap: 18px;
        flex-direction: column;
    }

    .dashboard-nav {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .dashboard-nav a {
        display: none;
    }

    .dashboard-main {
        width: min(92%, 600px);
        padding-top: 30px;
    }

    .dashboard-welcome {
        padding: 30px 24px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading > p {
        text-align: left;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }
}
/* Componentes de clases, evaluaciones y diploma */
.back-link{display:inline-block;margin-bottom:20px;color:#1e3a5f;font-weight:600;text-decoration:none}
.class-panel{min-height:auto}
.video-box{width:100%;height:360px;margin-top:20px;border-radius:15px;overflow:hidden;background:#f4f6fb}
.video-placeholder{height:100%;display:flex;align-items:center;justify-content:center;color:#687385;font-size:1.1rem}
.lesson-content{margin-top:18px;color:#435164;line-height:1.8}
.lesson-content h3{margin:18px 0 8px}
.quiz-form{display:grid;gap:20px}
.quiz-question{padding:22px;background:#fff;border:1px solid #e2e8ef;border-radius:16px}
.quiz-question legend{padding:0 8px;color:#1e3a5f;font-weight:600}
.quiz-question label{display:block;margin:12px 0;color:#435164;cursor:pointer}
.quiz-question input{margin-right:8px}
.quiz-result{padding:18px;text-align:center;font-weight:700;border-radius:12px}
.quiz-result.success{color:#236c47;background:#dcf4e7}
.quiz-result.error{color:#a3342b;background:#fde5e2}
.diploma{margin:40px auto 20px;max-width:900px;padding:70px 45px;
    text-align:center;background:#fff;border:12px double #1e3a5f;
    border-radius:12px;box-shadow:0 12px 35px rgba(30,58,95,.12)}
.diploma>p:first-child{letter-spacing:5px;color:#4f9dde;font-weight:700}
.diploma h1{margin:16px 0 35px;color:#1e3a5f;font-size:2.6rem}
.diploma span{color:#687385}
.diploma h2{margin:12px 0 20px;color:#1e3a5f;font-size:2.2rem}
.diploma-signature{margin-top:50px;padding-top:15px;border-top:1px solid #9ba7b5;color:#687385}
.print-button{max-width:340px;margin:20px auto 60px}
@media print{.dashboard-header,.print-button{display:none}
.dashboard-main{width:100%;padding:0}.diploma{box-shadow:none;margin:0}}

/* =====================================================
   DIPLOMA BLOQUEADO
===================================================== */

.diploma-locked-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(
      circle at top left,
      rgba(55, 106, 145, 0.16),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #f4f8fb,
      #eaf2f7
    );
}

.diploma-locked-card {
  width: 100%;
  max-width: 720px;
  padding: 42px;
  text-align: center;
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 20px 55px rgba(30, 65, 90, 0.15);
}

.locked-diploma-preview {
  position: relative;
  max-width: 570px;
  min-height: 300px;
  margin: 0 auto 28px;
  overflow: hidden;
  border: 10px solid #e6c978;
  outline: 2px solid #c6a64f;
  background: #fffdf7;
  box-shadow:
    0 14px 30px rgba(45, 67, 82, 0.14);
}

.locked-diploma-blur {
  min-height: 280px;
  padding: 35px 30px;
  filter: blur(4px);
  opacity: 0.45;
  user-select: none;
}

.locked-diploma-brand {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #285677;
}

.locked-diploma-blur h2 {
  margin: 0 0 18px;
  font-family: Georgia, serif;
  font-size: 46px;
  letter-spacing: 3px;
  color: #183e59;
}

.locked-diploma-blur p {
  margin: 12px 0;
  color: #64727c;
}

.locked-name-line {
  width: 65%;
  height: 2px;
  margin: 28px auto;
  background: #b9a46b;
}

.locked-signatures {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 45px;
}

.locked-signatures span {
  flex: 1;
  height: 1px;
  background: #88939a;
}

.locked-diploma-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    rgba(22, 53, 74, 0.22);
  backdrop-filter: blur(1px);
}

.locked-diploma-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  font-size: 46px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 12px 30px rgba(20, 45, 62, 0.25);
}

.locked-diploma-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #8a6513;
  background: #fff2c5;
  border-radius: 999px;
}

.diploma-locked-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 40px);
  color: #163d59;
}

.locked-diploma-text {
  max-width: 560px;
  margin: 0 auto 10px;
  font-size: 17px;
  line-height: 1.7;
  color: #51636f;
}

.locked-diploma-note {
  margin: 0 auto 28px;
  font-size: 14px;
  color: #81909a;
}

.locked-diploma-button {
  display: inline-flex;
  width: auto;
  min-width: 190px;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 600px) {
  .diploma-locked-card {
    padding: 25px 18px;
    border-radius: 18px;
  }

  .locked-diploma-preview {
    min-height: 235px;
    border-width: 7px;
  }

  .locked-diploma-blur {
    min-height: 220px;
    padding: 25px 15px;
  }

  .locked-diploma-blur h2 {
    font-size: 34px;
  }

  .locked-diploma-icon {
    width: 76px;
    height: 76px;
    font-size: 37px;
  }
}