:root {
  --color-primario: #6a11cb;
  --color-secundario: #2575fc;
  --color-texto: #333;
  --color-texto-claro: #fff;
  --color-fondo: #f0f8ff;
  --color-fondo-oscuro: #121212;
  --sombra: 0 4px 8px rgba(0,0,0,0.1);
  --transicion: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, var(--color-fondo), #ffffff);
  color: var(--color-texto);
  line-height: 1.6;
}

/* Herencia para encabezados */
h1, h2, h3, h4 {
  font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
  color: inherit;
}

/* Header  */
.header {
  background: linear-gradient(to right, var(--color-primario), var(--color-secundario));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  color: var(--color-texto-claro);
  box-shadow: var(--sombra);
  position: relative;
}

.logos {
  display: flex;
  gap: 20px;
  align-items: center;
}

.logo-izquierdo {
  width: 90px;
  height: 90px;
  border-radius: 40%;
  box-shadow: 0 2px 5px rgba(194, 22, 22, 0.2);
  object-fit: cover;
  border: 4px solid white;
  animation: rotar 10s linear infinite;
}

/* aqui esta el Título */
.titulo-pagina {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: #ff0000;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: entradaTitulo 2s ease-in-out, cambioColor 4s infinite;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  margin-top: 0;
}

/* barra de navegacion con la animaciones de cambio de color y demas */
.navbar {
  background-color: #ae29e3;
  padding: 10px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transicion);
}

.navbar.naranja {
  background-color: #ae29e3;
}

.navbar a {
  color: white;
  margin: 10px;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transicion);
}

.navbar a:hover {
  background-color: rgb(240, 119, 7);
  color: #000802;
  transform: scale(1.1);
}

/* Contenedor principal con el flexbox */
.contenedor-principal {
  display: flex;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Contenido principal */
.contenido-principal {
  flex: 3;
  background-color: #ffc0cb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--sombra);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.contenido-principal.visible {
  opacity: 1;
  transform: translateY(0);
}

.articulo {
  background-color: #ffe4e1;
  padding: 20px;
  border-radius: 8px;
}

/* para la barra lateral */
.sidebar {
  flex: 1;
  background-color: #add8e6;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--sombra);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.sidebar.visible {
  opacity: 1;
  transform: translateY(0);
}

/* colores del pie de pagina (recordatoriooooo...cambiar el color naranja)*/
.footer {
  background-color: #ae29e3;
  color: rgb(0, 0, 0);
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

/* para las imagenes principales que se centren y para dar color a las secciones que puse en el  index */
.imagen-central {
  display: block;
  margin: 20px auto;
  width: 60%;
  border-radius: 8px;
  transition: transform 0.5s ease;
  max-width: 100%;
  height: auto;
}

.imagen-central:hover {
  transform: scale(1.05);
}

.seccion-verde, .seccion-morada {
  margin: 30px 0;
  padding: 20px;
  border-radius: 10px;
  transition: var(--transicion);
}

.seccion-verde {
  background: rgba(62, 211, 57, 0.2);
  border-left: 5px solid green;
}

.seccion-morada {
  background: rgba(193, 35, 199, 0.2);
  border-left: 5px solid purple;
}

.boton-enlace {
  text-align: center;
  margin: 25px 0;
}

.boton-enlace a {
  background-color: #4169E1;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: var(--transicion);
  display: inline-block;
}

.boton-enlace a:hover {
  background-color: #27408B;
}

/* para el estillos de las tablas  */
.tabla-hardware {
  width: 100%;
  border-collapse: collapse;
  background-color: #e0ffff;
  margin: 20px 0;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s, transform 0.5s;
}

.tabla-hardware.visible {
  opacity: 1;
  transform: translateX(0);
}

.tabla-hardware tr {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s, transform 0.3s;
}

.tabla-hardware.visible tr {
  opacity: 1;
  transform: translateX(0);
}

.tabla-hardware th, .tabla-hardware td {
  padding: 12px;
  border: 1px solid #ccc;
  text-align: center;
  transition: var(--transicion);
}

.tabla-hardware th {
  background-color: #5bfa3c;
}

.tabla-hardware tr:hover td {
  background-color: rgba(91, 250, 60, 0.2);
}

/* para el estilos del formulario y las validadicones */
#formulario {
  background-color: rgba(255, 255, 255, 0.7);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

#formulario label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#formulario input,
#formulario select,
#formulario textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: var(--transicion);
}

#formulario input:focus,
#formulario select:focus,
#formulario textarea:focus {
  border-color: var(--color-primario);
  outline: none;
  box-shadow: 0 0 5px rgba(106, 17, 203, 0.5);
}

#formulario button {
  background-color: var(--color-primario);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transicion);
  width: 100%;
}

#formulario button:hover {
  background-color: var(--color-secundario);
}

.mensaje-flotante {
  display: none;
  background-color: #4CAF50;
  color: white;
  padding: 15px;
  border-radius: 5px;
  margin-top: 15px;
  animation: fadeIn 0.5s;
}

#mensajeError {
  display: none;
  background-color: #f44336;
  color: white;
  padding: 15px;
  border-radius: 5px;
  margin-top: 15px;
  animation: fadeIn 0.5s;
}

/* las animaciones al iniciar la pagina, el logo, los cabios de color de letra y los stickers que puse*/
@keyframes entradaTitulo {
  from {
    opacity: 0;
    transform: translateY(-30px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

@keyframes rotar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes cambioColor {
  0% { color: #e4fd03; }
  25% { color: #d8680c; }
  50% { color: #15ddd3; }
  75% { color: #0ec526; }
  100% { color: #7f028a; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flotar {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}
/* los botones de los modos y para volver hacia arriba */
.boton-top, .boton-modo {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: #6a11cb;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  z-index: 1002;
  margin-top: 10px;
}
.boton-modo {
  bottom: 20px;
}

.boton-top:hover, .boton-modo:hover {
  background-color: #2575fc;
}

/* este es para el modo oscuro */
body.modo-oscuro {
  background: var(--color-fondo-oscuro);
  color: #e0e0e0;
}

body.modo-oscuro .contenido-principal,
body.modo-oscuro .sidebar,
body.modo-oscuro .tabla-hardware {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

body.modo-oscuro .footer {
  background-color: #333;
}

body.modo-oscuro .articulo {
  background-color: #3d3d3d;
}

body.modo-oscuro .navbar {
  background-color: #4a148c;
}

body.modo-oscuro .navbar.naranja {
  background-color: #bf360c;
}

body.modo-oscuro #formulario {
  background-color: #3d3d3d;
  color: #e0e0e0;
}

body.modo-oscuro #formulario input,
body.modo-oscuro #formulario select,
body.modo-oscuro #formulario textarea {
  background-color: #555;
  color: #e0e0e0;
  border-color: #777;
}

/* La paste del responsive  desing  (para otros dispositivos) */
@media (max-width: 992px) {
  .contenedor-principal {
    flex-direction: column;
  }
  
  .sidebar {
    order: -1;
    margin-bottom: 20px;
  }
  
  .titulo-pagina {
    position: static;
    transform: none;
    text-align: center;
    margin: 10px 0;
    white-space: normal;
  }
  
  .header {
    flex-direction: column;
    text-align: center;
  }
  
  .logos {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .navbar {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .navbar a {
    margin: 5px 0;
    padding: 6px 10px;
  }
  
  .imagen-central {
    width: 90%;
  }
  
  video {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 576px) {
  .header, .footer {
    padding: 10px;
  }
  
  .contenido-principal, .sidebar {
    padding: 15px;
  }
  
  .tabla-hardware th, .tabla-hardware td {
    padding: 8px;
    font-size: 0.9rem;
  }
  
  .seccion-verde, .seccion-morada {
    padding: 15px;
  }
}

/* aqui le doy los nuevos estilos para la tercera pagina html "software"*/
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.software-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--sombra);
  transition: var(--transicion);
}

.software-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.software-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 5px;
  margin-bottom: 10px;
}

.software-card h3 {
  color: var(--color-primario);
  margin-top: 0;
}

.software-card p {
  color: #666;
}

.software-card .categoria {
  display: inline-block;
  background-color: #e0f7fa;
  color: #00796b;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.sticker {
  position: fixed;
  width: 60px;
  z-index: 1001;
  animation: flotar 1s ease-in-out infinite alternate;
}

.sticker1 {
  bottom: 150px;
  left: 20px;
}

.sticker2 {
  bottom: 150px;
  right: 20px;
}

.redes a img {
  width: 30px;
  margin: 0 8px;
  transition: transform 0.3s;
}

.redes a:hover img {
  transform: scale(1.3);
}
.navbar.secundaria {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
}

.navbar.secundaria a {
  display: block;
  width: 100%;
  text-align: left;
  margin: 5px 0;
}
.btn-registro{
    display:block;
    margin-top:12px;
    padding:10px;
    background:#4CAF50;
    color:white;
    text-align:center;
    text-decoration:none;
    border-radius:6px;
    font-weight:bold;
    transition: background 0.3s;
}

.btn-registro:hover{
    background:#388E3C;
}
