/* =========================== */
/*         RESET Y BASE        */
/* =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Roboto', sans-serif;
  background: #0d0d1a;
  color: #e0f7ff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================== */
/*      VARIABLES DE COLOR     */
/* =========================== */
:root {
  --neon-blue: #00ffff;
  --neon-purple: #7a00ff;
  --dark-bg: #0d0d1a;
  --soft-bg: #1a1a33;
  --light-bg: #111122;
  /* Una variable extra para dar “luz” al menú */
  --menu-bright: #1a2a44; /* fondo un poco más claro para el menú */
  --glow: 0 0 8px var(--neon-blue), 0 0 20px var(--neon-purple);
}

/* =========================== */
/*       ESTILOS DEL MENÚ      */
/* =========================== */

/* Botón de menú: visible en móviles */
#menu-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: var(--neon-blue);
  color: #0d0d1a;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 8px;
  z-index: 1100;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: background 0.3s ease;
}
/* Menú lateral */
.sidebar {
  width: 250px;
  height: 100vh;
  background: linear-gradient(180deg, #0f0c29, #302b63, #24243e);
  color: #ffffff;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.sidebar h2 {
  font-size: 24px;
  margin-bottom: 30px;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
}

.sidebar img {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px #00f0ff);
}

.sidebar a {
  text-decoration: none;
  color: #fff;
  margin: 15px 0;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 255, 255, 0.1);
}

.sidebar a:hover {
  background: rgba(0, 255, 255, 0.3);
  color: #00f0ff;
  box-shadow: 0 0 10px #00f0ff;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px;
    box-shadow: none;
  }

  .sidebar a {
    margin: 5px;
    font-size: 14px;
    padding: 8px;
  }

  .sidebar h2 {
    font-size: 18px;
  }

  .sidebar img {
    width: 50px;
    height: 50px;
  }
}
#menu-toggle:hover {
  background: var(--neon-purple);
}

/* Sidebar o menú lateral */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100%;
  background: var(--menu-bright);
  padding: 1rem;
  overflow-y: auto;
  border-right: 2px solid var(--neon-purple);
  box-shadow: 4px 0 15px var(--neon-purple);
  transform: translateX(-100%);
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 1001;
}
#sidebar.open {
  transform: translateX(0);
}

/* Contenedor del logo en el sidebar */
.logo-container {
  text-align: center;
  margin-bottom: 1rem;
}
.logo-container .logo {
  max-width: 80%;
  margin-bottom: 0.5rem;
}
#sidebar h1 {
  font-size: 1.8rem;
  color: var(--neon-blue);
  text-shadow: var(--glow);
}

/* Enlaces de navegación del sidebar */
.sidebar-nav a {
  display: block;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--neon-blue);
  background: var(--soft-bg);
  border: 1px solid var(--neon-blue);
  border-radius: 8px;
  transition: all 0.3s ease;
}
.sidebar-nav a:hover {
  background: var(--neon-blue);
  color: #0d0d1a;
  transform: scale(1.02);
  box-shadow: var(--glow);
}

/* Overlay para el menú en móvil */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 13, 26, 0.6);
  display: none;
  z-index: 1050;
}
#overlay.active {
  display: block;
}

/* =========================== */
/*        HEADER PRINCIPAL     */
/* =========================== */
.main-header {
  background: linear-gradient(to right, var(--dark-bg), var(--soft-bg));
  padding: 2rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--neon-blue);
  box-shadow: 0 0 15px var(--neon-blue);
}
.header-container {
  max-width: 900px;
  margin: 0 auto;
}
.header-container h1 {
  font-size: 2.5rem;
  color: var(--neon-blue);
  text-shadow: var(--glow);
}
.header-container p {
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

/* =========================== */
/*       BARRA DE BÚSQUEDA     */
/* =========================== */
.search-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 600px;
  padding: 0 1rem;
}
#course-search {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--neon-blue);
  border-radius: 8px;
  background: var(--soft-bg);
  color: var(--neon-blue);
  outline: none;
  transition: border 0.3s ease;
}
#course-search:focus {
  border-color: var(--neon-purple);
}

/* =========================== */
/*     CONTENEDOR PRINCIPAL    */
/* =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 2rem;
  transition: margin-left 0.3s ease;
}
@media (max-width: 768px) {
  .container {
    margin-left: 0;
    padding: 1rem;
  }
}

/* =========================== */
/*         SECCIONES           */
/* =========================== */
.course-section {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid var(--neon-blue);
  margin-bottom: 2rem;
  box-shadow: 0 0 12px var(--neon-purple);
  animation: fadeInUp 0.6s forwards;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.course-title {
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--neon-blue);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: var(--glow);
}

/* Video introductorio */
.video-intro {
  margin-bottom: 1rem;
  border: 2px solid var(--neon-blue);
  border-radius: 8px;
  overflow: hidden;
}

/* Barra de Progreso */
.progress {
  background: var(--soft-bg);
  border: 1px solid var(--neon-blue);
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}
.progress-bar {
  height: 10px;
  background: var(--neon-blue);
  width: 0%;
  transition: width 0.3s ease;
}

/* Lista de Lecciones */
.lecciones {
  transition: max-height 0.4s ease;
  overflow: hidden;
}
.lesson-item {
  background: var(--soft-bg);
  border: 1px solid var(--neon-blue);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.lesson-item.completada {
  background: #0f2d3a;
  border-color: lime;
  text-decoration: line-through;
  opacity: 0.8;
}
.lesson-checkbox {
  transform: scale(1.2);
}

/* Sistema de Valoraciones (estrellas) */
.rating {
  margin: 1rem 0;
  text-align: center;
  font-size: 1.5rem;
}
.star {
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s ease;
}
.star.selected {
  color: var(--neon-blue);
}

/* Botón para acceder al curso completo */
.course-btn {
  background: var(--neon-blue);
  color: #0d0d1a;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  margin: 1rem auto 0;
}
.course-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--glow);
}

/* =========================== */
/*         TESTIMONIOS         */
/* =========================== */
.testimonials {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid var(--neon-blue);
  margin-bottom: 2rem;
  box-shadow: 0 0 12px var(--neon-purple);
  text-align: center;
}
.testimonials h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--neon-blue);
  text-shadow: var(--glow);
}
.testimonial-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.testimonial {
  background: var(--soft-bg);
  border: 1px solid var(--neon-blue);
  padding: 1rem;
  border-radius: 8px;
  max-width: 600px;
  font-style: italic;
}
.testimonial span {
  display: block;
  margin-top: 0.5rem;
  color: var(--neon-purple);
}

/* =========================== */
/*          PIE DE PÁGINA      */
/* =========================== */
.footer {
  background: var(--dark-bg);
  padding: 1rem;
  border-top: 2px solid var(--neon-purple);
  text-align: center;
  color: #aaa;
  margin-top: 2rem;
}
.footer-container .social-links a {
  margin: 0 0.5rem;
  color: var(--neon-blue);
  text-decoration: none;
  font-size: 1.5rem;
}

/* =========================== */
/*      SCROLLBAR PERSONALIZADO */
/* =========================== */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--soft-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-blue);
  border-radius: 8px;
}
/* Estilos generales del menú lateral */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background-color: #222; /* Fondo oscuro */
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 100;
}

/* Estilo cuando el menú está activo */
.sidebar.active {
  transform: translateX(0);
}

/* Estilos para los enlaces del menú */
.sidebar a {
  text-decoration: none;
  color: #fff;
  margin: 15px 0;
  font-size: 18px;
  font-weight: bold;
  padding: 10px;
  width: 100%;
  text-align: center;
  border-radius: 5px;
  background: linear-gradient(45deg, #6a82fb, #fc5c7d); /* Degradado colorido */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

/* Efecto de hover en los enlaces */
.sidebar a:hover {
  background: linear-gradient(45deg, #fc5c7d, #6a82fb); /* Cambio en el color de fondo al pasar el ratón */
  color: #fff;
  transform: scale(1.1);
}

/* Estilos para la imagen de logo */
.sidebar img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

/* Título de CryptoEduar */
.sidebar h2 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 40px;
}

/* Botón hamburguesa */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 150;
}

.hamburger-menu .bar {
  width: 30px;
  height: 4px;
  background-color: #fff;
  border-radius: 5px;
}

/* Estilos para hacer visible el botón hamburguesa solo en móviles */
@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }
}
/* Estilos para la sección de testimonios */
.testimonios {
  background-color: #f8f8f8; /* Fondo suave para la sección */
  padding: 50px 20px;
  text-align: center;
}

.testimonios h2 {
  font-size: 32px;
  color: #333;
  margin-bottom: 20px;
}

.testimonio {
  background: linear-gradient(45deg, rgba(255, 0, 0, 0.7), rgba(255, 69, 0, 0.7)); /* Degradado rojo brillante */
  color: #fff;
  border-radius: 10px;
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 1.2em;
}

.testimonio-texto {
  font-size: 1.4em;
  font-weight: bold;
  color: #ff6347; /* Color rojo brillante */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4); /* Sombra para darle más luz al texto */
  margin-bottom: 20px;
}
/* Estilos para la sección de testimonios */
.testimonios {
  padding: 50px 20px;
  text-align: center;
  background: transparent; /* Mantener el fondo transparente para que combine con el fondo futurista */
}

.testimonios h2 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); /* Añadir un poco de sombra al título */
}

.testimonio {
  background: rgba(0, 0, 0, 0.6); /* Fondo negro semitransparente para que combine con el fondo futurista */
  color: #fff;
  border-radius: 10px;
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.testimonio-texto {
  font-size: 1.4em;
  font-weight: bold;
  color: #ff4c4c; /* Rojo neón brillante */
  text-shadow: 0 0 10px #ff4c4c, 0 0 20px #ff4c4c, 0 0 30px #ff4c4c; /* Sombra neón para resaltar */
  margin-bottom: 20px;
}

.testimonio-autor {
  font-size: 1.2em;
  color: #fff;
  font-style: italic;
}
/* Estilos para la sección de testimonios */
.testimonios {
  padding: 50px 20px;
  text-align: center;
  background: transparent; /* Mantener el fondo transparente para que combine con el fondo futurista */
}

.testimonios h2 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); /* Sombra al título */
}

.testimonio {
  background: rgba(0, 0, 0, 0.6); /* Fondo oscuro semitransparente */
  color: #fff;
  border-radius: 20px;
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* Sombra sutil */
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Borde neón para el contorno */
.testimonio::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, #ff4c4c, #ff0099, #00b3ff, #00ff66); /* Borde neón en varios colores */
  z-index: -1;
  filter: blur(5px); /* Efecto borroso para el borde */
  border-radius: 20px;
}

/* Texto del testimonio */
.testimonio-texto {
  font-size: 1.4em;
  font-weight: bold;
  color: #ff4c4c; /* Rojo neón brillante */
  text-shadow: 0 0 10px #ff4c4c, 0 0 20px #ff4c4c, 0 0 30px #ff4c4c; /* Efecto de sombra neón */
  margin-bottom: 20px;
}

.testimonio-autor {
  font-size: 1.2em;
  color: #fff;
  font-style: italic;
}
