/* ===================================================
   1. RESET BÁSICO Y REGLAS GLOBALES
   =================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: red !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Imágenes y medios adaptables */
img, video {
  max-width: 100%;
  height: auto;
}

/* ===================================================
   2. ESTILOS MÓVIL PRIMERO (MOBILE-FIRST)
   =================================================== */

/* Header / Navbar */
.site-header {
  background-color: #1e293b;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column; /* Apilado vertical en móviles */
  align-items: center;
  gap: 1rem;
}

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

.main-nav {
  display: flex;
  gap: 1rem;
}

.main-nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: #38bdf8;
}

/* Estructura Principal */
.main-layout {
  flex: 1; /* Empuja el footer hacia el final */
  display: flex;
  flex-direction: column; /* Una sola columna en móvil */
  padding: 1rem;
  gap: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.content {
  flex: 1;
}

.hero {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Tarjetas flexbox */
.cards-container {
  display: flex;
  flex-direction: column; /* Apiladas en móvil */
  gap: 1rem;
}

.card {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #0284c7;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Sidebar */
.sidebar {
  background-color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
}

/* Footer */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
}

/* ===================================================
   3. MEDIA QUERIES (PANTALLAS MEDIANAS Y GRANDES)
   =================================================== */

/* Tablet y Escritorio (desde 768px en adelante) */
@media (min-width: 768px) {
  
  /* Header horizontal */
  .site-header {
    flex-direction: row;
    justify-content: space-between;
  }

  /* Tarjetas alineadas horizontalmente */
  .cards-container {
    flex-direction: row;
  }

  .card {
    flex: 1; /* Distribuye el ancho equitativamente */
  }

  /* Layout principal de 2 columnas (Contenido + Sidebar) */
  .main-layout {
    flex-direction: row;
    padding: 2rem;
  }

  .content {
    flex: 3; /* Ocupa el 75% del ancho aproximadamente */
  }

  .sidebar {
    flex: 1; /* Ocupa el 25% del ancho aproximadamente */
  }
}

/* Ajuste de listas dentro del temario */
.content ol, .content ul {
  line-height: 1.7;
}

.content li {
  margin-bottom: 0.5rem;
}

.content ul ul {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}
