:root {
  --red: #B71C1C;
}

body {
    background-color: #fff;
    color: #000;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Header */
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: black; 
        color: white;
        /* padding: 1rem 2rem; */
        font-family: sans-serif;
    }

    .logoImg{
      
        height: 100px;
    }

    .menu-left,
    .menu-center,
    .user-area {
        display: flex;
        align-items: center;
    
    }
    
    .left-menu-ittems a{
      margin-left: 3rem;
      text-decoration: none;
      color: white;
      font-weight:600; 
      font-size:1rem; 
      line-height:40px
    }

   .left-menu-ittems a:hover {
     color: var(--red);
     text-decoration: none;

    }

    .menu-icon {
        font-size: 1.5rem;
        margin-right: 1rem;
        cursor: pointer;
    }

    .logo {
        font-size: 1.8rem;
        font-weight: bold;
    }

    .menu-center a {
        margin: 0 1rem;
        color: white;
        text-decoration: none;
        font-weight: 500;
    }

    .menu-center a:hover {
        text-decoration: underline;
    }

    .user-area {
        gap: 0.5rem;
        cursor: pointer;
        margin-right: 15px;
    }

    .user-circle {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background-color: white;
    }

    .username {
        font-weight: 500;
    }

    @media (max-width: 768px) {
        .menu-center {
            display: none; 
        }
    }

    .sidebar {
    position: fixed;
    top: 0;
    right: -250px; 
    width: 250px;
    height: 100%;
    background-color: #222;
    color: white;
    padding-top: 60px;
    transition: right 0.3s ease;
    z-index: 1000;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    padding: 1rem 2rem;
    border-bottom: 1px solid #444;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
}

.sidebar ul li a:hover {
    background-color: #444;
}

.sidebar.open {
    right: 0;
}

.sidebar-profile {
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
    border-bottom: 1px solid #444;
}

.avatar-circle img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background-color: #555;
}

.sidebar-username {
    margin-top: 0.8rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* fi Header */

/* Login */

/* Background */
/* Background */
.login-body {
  background-color: #000;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Garet', sans-serif;
   background-color: #000;
  background-image:
    linear-gradient(90deg, rgba(255,0,0,0.2) 1px, transparent 1px),
    linear-gradient(rgba(255,0,0,0.2) 1px, transparent 1px);
  background-size: 50px 50px;
  background-repeat: repeat;
}

/* Container */
.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

/* Login Box */
.login-box {
  background-color: #111;
  /* border: 1px solid var(--red); */
  /* box-shadow: 0 0 15px rgba(255,0,0,0.2); */
  border-radius: 8px;
  padding: 40px 30px;
  color: white;
}


/* Logo */
.login-logo {
  max-width: 220px;
}

/* Title */
.login-title {
  font-size: 1.1rem;
  color: var(--red);
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 30px;
}

/* Inputs */
.login-input {
  background-color: #222;
  border: none;
  color: #fff;
  height: 45px;
  font-size: 0.9rem;
}

.login-input::placeholder {
  color: #aaa;
}

.login-input:focus {
  background-color: #222;
  color: #fff;
  box-shadow: 0 0 0 2px var(--red);
  outline: none;
}

/* Password icon */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #aaa;
  cursor: pointer;
}

/* Button */
.login-btn {
  background-color: var(--red);
  color: #fff;
  font-weight: bold;
  padding: 10px 25px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

.login-btn:hover {
  background-color: var(--red);
}

/* Text links */
.login-links a {
  color: var(--red);
  text-decoration: none;
  font-weight: 500;
}

.login-links a:hover {
  text-decoration: underline;
}

.alert {
  font-size: 0.85rem;
  padding: 10px;
}

/* fi login */

/* Home */
.course-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.course-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.course-title {
    padding: 1rem;
    font-weight: bold;
    padding-left: 0rem;
}




/* fi home */


/* Menú lateral modules */
/* ==== SIDEBAR ==== */
.course-sidebar {
  background-color: #fff;
  color: #000;
  width: 280px;
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
  flex-shrink: 0;
  border-right: 1px solid #ddd;
  font-family: 'Inter', sans-serif;
}

.course-sidebar summary {
  list-style: none;   
  cursor: pointer;
  padding: 0.6rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  position: relative;
  border-bottom: 1px solid #eee;

  &::-webkit-details-marker {
    display: none;
  }
}

.course-sidebar summary::after {
  content: '►';
  position: absolute;
  right: 0;
  transition: transform .2s ease;
}

.course-sidebar details[open] summary::after {
  transform: rotate(90deg);
}


.course-sidebar details ul {
  padding-left: 0.8rem;
  margin: 0.3rem 0 0 0;
  border-left: 2px solid #f0f0f0;
}

.course-sidebar .ul-lateral-menu {
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
}


.course-sidebar .ul-lateral-menu img {
  margin-right: 6px;
  opacity: 0.8;
}

.course-sidebar a {
  display: block;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 400;
  font-size: 0.9rem;
}

.course-sidebar a:hover {
  color: var(--red);
  background-color: #f8f9fa;
  border-radius: 4px;
}


.course-sidebar a.active {
  color: var(--red);
  font-weight: 600;
  border-left: 3px solid var(--red);
  padding-left: 6px;
}

.course-sidebar h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e5e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-sidebar h5::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 18px;
    border-radius: 2px;
}


/* ==== CONTENIDO PRINCIPAL ==== */
#contenido-md {
  max-width: 1000px;
  margin: 40px auto;
  background: #fff;
  /* padding: 20px 30px; */
  /* border: 1px solid #ddd; */
  /* border-right: solid 1px #ddd; */
  /* padding-left: 70px; */
  /* padding: 70px; */
}

/* Titulares con línea inferior */
#contenido-md h1, #contenido-md h2 {
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

/* Texto general */
#contenido-md p {
  line-height: 1.6;
  font-size: 1rem;
  color: #333;
}

/* ==== TOOLBAR SUPERIOR ==== */
.top-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 20px;
}

.fullscreen-icon {
  font-size: 20px;
  cursor: pointer;
  color: #444;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.fullscreen-icon:hover {
  background: #f0f0f0;
  color: var(--red);
}

.row-botones{
      display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.row-botones a{
    text-decoration: none;
    background-color: var(--red);
    color: white;
    padding: 5px;
    border-radius: 5px;
}

.table-wrap { overflow-x: auto; }
.nice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.nice-table th, .nice-table td {
  border: 1px solid #e5e7eb; /* gris claro */
  padding: 10px 12px;
  vertical-align: top;
}
.nice-table thead th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: left;
}
.nice-table tbody tr:nth-child(even) {
  background: #fafafa; /* zebra */
}
.nice-table code { background: none; color: inherit; } /* por si usas <code> */


/* FI ver.php */

/* Ajuste para inputs con icono de ojo y validación */
.login-input,
.login-input.is-invalid,
.login-input.is-valid {
  padding-right: 3rem; /* espacio suficiente para el icono */
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  user-select: none;
}

.pricing-table {
  font-family: 'Inter', sans-serif;
  text-align: center;
  padding: 2em;
  background: #121212;
  color: #fff;
}

.pricing-table h2 {
  margin-bottom: 2em;
  color: #fff;
}

.pricing-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2em;
}

.card-sub {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 2em 1.5em;
  width: 250px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.card-sub:hover {
  transform: translateY(-5px);
  border-color: var(--red);
}

.card-sub.selected {
  border-color: var(--red);
  box-shadow: 0 0 20px var(--red);
}

.card-sub .header {
  font-size: 1.4em;
  margin-bottom: 0.5em;
  font-weight: bold;
  color: #fff;
  padding: 0.5em;
  border-radius: 6px;
}

.header.gratis {
  background: #666;
}

.header.vip {
  background: #2196f3;
}

.header.pro {
  background: var(--red);
}

.price {
  font-size: 1.8em;
  font-weight: bold;
  margin: 0.5em 0 1em 0;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features li {
  text-align: left;
  margin: 0.5em 0;
  font-size: 0.95em;
}

.features li i {
  margin-right: 0.5em;
  color: var(--red);
}

.features li .fa-xmark {
  color: #f44336;
}

#btn-siguiente {
  margin-top: 2em;
  padding: 0.8em 2em;
  background: var(--red);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s;
}

#btn-siguiente.enabled {
  opacity: 1;
}

#btn-siguiente:hover:enabled {
  background: var(--red);
}
/* ===== HOME COURSES SECTION ===== */

.body-home{
  background-color:rgb(36, 37, 37) ;
}

/* Filtros */
.filters a {
    color: #f5f5f5;
    background-color: #222;
    border: 1px solid #333;
    padding: 6px 14px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.filters a.active,
.filters a:hover {
    background-color: #333;
    border-color: #555;
    color: var(--red);
}

/* Buscador */
.search-bar input.form-control {
    background-color: #222;
    border: 1px solid #333;
    color: #f5f5f5;
}

.search-bar input.form-control::placeholder {
    color: #aaa;
}

.search-bar input.form-control:focus {
    border-color: var(--red);
    box-shadow: none;
    background-color: #222;
    color: #f5f5f5;
}

.search-bar .btn {
    border-color: #333;
}

/* Tarjetas de cursos */
.course-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}


/* Imágenes dentro de tarjetas */
.course-card img.course-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

/* Contenido tarjeta */
.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.card-text {
    font-size: 0.9rem;
    color: #ddd;
    flex-grow: 1;
}

/* Botón de inscripción */
.enroll-btn {
    background-color: var(--red);
    color: white;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px;
    margin-top: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.enroll-btn:hover {
    background-color: #8e1616;
}

/* Precio */
.price {
    font-weight: bold;
    color: var(--red);
    font-size: 1rem;
    margin-top: 0.7rem;
}

/* Mensaje sin resultados */
.text-muted {
    color: #999 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .row.g-4 {
        flex-direction: column;
        align-items: center;
    }

    .course-card {
        width: 90%;
    }
}

.container-body{

  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-bar.d-flex{
  width: 70%;
  margin-top: 1rem;
  margin-bottom: 2rem !important;
}

.container-body h1{
  color: white;
  margin-bottom: 3rem !important;
}


/* Contenedor general */
.courses-horizontal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Tarjeta horizontal */
.course-card-horizontal {
    display: flex;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}


/* Imagen */
.course-image-horizontal {
    flex: 0 0 180px;
    overflow: hidden;
}

.course-image-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contenido */
.course-content-horizontal {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-level {
    background-color: var(--red);
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    align-self: flex-start;
}

.course-title {
    margin: 0.5rem 0;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
}

.course-description {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

/* Botón continuar */
.btn-continue {
    align-self: flex-start;
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-continue:hover {
    background-color: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* Responsive: vertical en móviles */
@media (max-width: 768px) {
    .course-card-horizontal {
        flex-direction: column;
    }

    .course-image-horizontal {
        width: 100%;
        height: 160px;
    }
}

/* Preview */

/* Títulos (sección principal) */

.list-group-item.bg-secondary {
    background-color: #3a3a3a !important;
    border-top: 2px solid #555 !important;
    font-weight: bold;
}

/* Subtemas */
.subtemas .list-group-item {
    background-color: #212121 !important;
    border-bottom: 1px solid #444 !important;
    padding-left: 2rem; /* Sangría */
}

/* Íconos */
.list-group-item i {
    color: #bbb;
}
.course-card {
    border: 1px solid #333;
    background-color: #111;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    width: 306px;
}
.course-card .course-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.contenedor-cursos{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;            
  align-items: start;   
}

@media (max-width: 1200px){
  .contenedor-cursos{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px){
  .contenedor-cursos{
    grid-template-columns: 1fr;
  }
}

.course-image-wrap { position: relative; }

.premium-icon{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(0,0,0,.6);
  color: #facc15;           /* amarillo premium */
  border-radius: 999px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.premium-icon i{ font-size: 1rem; line-height: 1; }




.course-image-wrap { position:relative; }
.level-ribbon{
  position:absolute; top:10px; left:10px;
  padding:4px 10px; border-radius:999px;
  font-size:.78rem; font-weight:600; display:inline-flex; align-items:center; gap:.4rem;
  color:#fff; backdrop-filter: blur(4px);
}
.level-intro { background:#3b82f6; }     /* azul  -> introductorio */
.level-mid   { background:#10b981; }     /* verde -> intermedio   */
.level-adv   { background:#f59e0b; }     /* ámbar -> avanzado     */
.level-exp   { background:#ef4444; }     /* rojo  -> experto      */


.price-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  backdrop-filter: blur(4px);
}

.ribbon-free { background: #22c55e; }    
.ribbon-paid { background: #ef4444; }    

.public-header {
  background-color: #0d0d0d;
  padding: 0.4rem 0;
}

/* Nav container */
.public-nav .container {
  max-width: 1200px;
}

/* Menú */
.public-menu {
  list-style: none;
  gap: 1.2rem;
  margin-right: 100px;
}

.public-menu li a {
  color: white;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 6px;
}

/* Hover */
.public-menu li a:hover {
  color: var(--red);
  
}

/* Activo */
.public-menu li a.active {
  color: #e63946;
  font-weight: 600;
}

/* Responsive: centrar en móvil */
@media (max-width: 768px) {
  .public-menu {
    flex-direction: column;
    align-items: flex-start;
    background: #111;
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
  }
  
}






.badge.level-intro { background:#3b82f6 !important; color:#fff; }
.badge.level-mid   { background:#10b981 !important; color:#fff; }
.badge.level-adv   { background:#f59e0b !important; color:#111; }
.badge.level-exp   { background:#ef4444 !important; color:#fff; }

p code, li code {
  background: #0d1117;
  color: #c9d1d9;
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: #0d1117;
  color: #c9d1d9;
  padding: 12px;
  border-radius: 6px;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}